/// <summary>
 /// Creates a new instance of the ServerConfiguration class and sets the
 /// properties to their default values.
 /// </summary>
 public ServerConfiguration()
 {
     Host = DEFAULT_BIND_ADDRESS;
     Port = SessionLayerProtocol.PORT;
     IdleTimeout = IDLE_TIMEOUT;
     ReceiveTimeout = RECEIVE_TIMEOUT;
     SendTimeout = SEND_TIMEOUT;
     TlsConfiguration = new TlsConfiguration();
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new instance of the ServerConfiguration class and sets the
 /// properties to their default values.
 /// </summary>
 public ServerConfiguration()
 {
     Host             = DEFAULT_BIND_ADDRESS;
     Port             = SessionLayerProtocol.PORT;
     IdleTimeout      = IDLE_TIMEOUT;
     ReceiveTimeout   = RECEIVE_TIMEOUT;
     SendTimeout      = SEND_TIMEOUT;
     TlsConfiguration = new TlsConfiguration();
 }
Esempio n. 3
0
 public Session(
     StreamSocket streamSocket,
     string address,
     TlsConfiguration tlsConfiguration,
     Dictionary<ushort, ProtocolConfiguration> protocolConfigurations,
     Logger logger,
     object userData = null)
     : base(protocolConfigurations, logger, userData)
 {
     this.streamSocket = streamSocket;
     this.iS = streamSocket.InputStream.AsStreamForRead();
     this.oS = streamSocket.OutputStream.AsStreamForWrite();
     this.Address = address;
     this.TlsConfiguration = tlsConfiguration;
     Id = SessionId.NextId;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates the session and saves references to the passed objects.
 /// </summary>
 /// <param name="stream">The socket stream.</param>
 /// <param name="address">The IP address of the remote end point.</param>
 /// <param name="tlsConfiguration">The SSL/TLS configuration object.</param>
 /// <param name="protocolConfigurations">A Dictionary of ProtocolConfiguration
 /// objects keyed by each protocol's unique identifier.</param>
 /// <param name="logger">The Logger.</param>
 /// <param name="userData">An optional Object the user can pass through to each protocol.</param>
 public Session(
     Stream stream, 
     string address, 
     TlsConfiguration tlsConfiguration, 
     Dictionary<ushort, ProtocolConfiguration> protocolConfigurations,
     Logger logger, 
     object userData = null)
     : base(protocolConfigurations, logger, userData)
 {
     this.stream = stream;
     this.Address = address;
     this.TlsConfiguration = tlsConfiguration;
     Id = SessionId.NextId;
 }