Added transmitting state to WebSocket.
Added ConfigureAwait to async code.