Working web socket encoding