/// <summary> /// Initializes a new instance of the client. /// </summary> protected ClientBase() { m_textEncoding = Encoding.ASCII; m_currentState = ClientState.Disconnected; m_maxConnectionAttempts = DefaultMaxConnectionAttempts; m_sendBufferSize = DefaultSendBufferSize; m_receiveBufferSize = DefaultReceiveBufferSize; Statistics = new TransportStatistics(); m_updateBytesSent = TrackStatistics ? UpdateBytesSent : new Action <int>(bytes => { }); m_updateBytesReceived = TrackStatistics ? UpdateBytesReceived : new Action <int>(bytes => { }); Name = GetType().Name; }
/// <summary> /// Initializes a new instance of the <see cref="TransportProvider{T}"/> class. /// </summary> public TransportProvider() { ID = Guid.NewGuid(); Statistics = new TransportStatistics(); }