Esempio n. 1
0
 /// <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;
     PersistSettings         = DefaultPersistSettings;
     m_settingsCategory      = DefaultSettingsCategory;
     Statistics            = new TransportStatistics();
     m_updateBytesSent     = TrackStatistics ? UpdateBytesSent : new Action <int>(bytes => { });
     m_updateBytesReceived = TrackStatistics ? UpdateBytesReceived : new Action <int>(bytes => { });
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransportProvider{T}"/> class.
 /// </summary>
 public TransportProvider()
 {
     ID         = Guid.NewGuid();
     Statistics = new();
 }
Esempio n. 3
0
 /// <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;
     m_persistSettings = DefaultPersistSettings;
     m_settingsCategory = DefaultSettingsCategory;
     m_transportStatistics = new TransportStatistics();
     m_updateBytesSent = TrackStatistics ? UpdateBytesSent : new Action<int>(bytes => { });
     m_updateBytesReceived = TrackStatistics ? UpdateBytesReceived : new Action<int>(bytes => { });
 }