Get cookie via TCPSocket