void Initialize(WebSocketTransportDuplexSessionChannel webSocketTransportDuplexSessionChannel, WebSocket webSocket, bool useStreaming, IDefaultCommunicationTimeouts defaultTimeouts)
 {
     _webSocket = webSocket;
     _encoder = webSocketTransportDuplexSessionChannel.MessageEncoder;
     _bufferManager = webSocketTransportDuplexSessionChannel.BufferManager;
     _localAddress = webSocketTransportDuplexSessionChannel.LocalAddress;
     _maxBufferSize = webSocketTransportDuplexSessionChannel.MaxBufferSize;
     _maxReceivedMessageSize = webSocketTransportDuplexSessionChannel.TransportFactorySettings.MaxReceivedMessageSize;
     _receiveBufferSize = Math.Min(WebSocketHelper.GetReceiveBufferSize(_maxReceivedMessageSize), _maxBufferSize);
     _useStreaming = useStreaming;
     _defaultTimeouts = defaultTimeouts;
     _closeDetails = webSocketTransportDuplexSessionChannel._webSocketCloseDetails;
     _asyncReceiveTimeout = _defaultTimeouts.ReceiveTimeout; 
     _asyncReceiveState = AsyncReceiveState.Finished;
 }
            public WebSocketMessageSource(WebSocketTransportDuplexSessionChannel webSocketTransportDuplexSessionChannel, WebSocket webSocket,
                    bool useStreaming, IDefaultCommunicationTimeouts defaultTimeouts)
            {
                Initialize(webSocketTransportDuplexSessionChannel, webSocket, useStreaming, defaultTimeouts);

                StartNextReceiveAsync();
            }