/// <summary> /// Constructor. /// </summary> /// <param name="options">The server options.</param> /// <param name="endpointDefinition">The endpoint definition.</param> internal SmtpSessionContext(ISmtpServerOptions options, IEndpointDefinition endpointDefinition) { ServerOptions = options; EndpointDefinition = endpointDefinition; Transaction = new SmtpMessageTransaction(); Properties = new Dictionary <string, object>(); }
/// <summary> /// Constructor. /// </summary> /// <param name="options">The server options.</param> /// <param name="tcpClient">The TCP client that the session is connected with.</param> internal SmtpSessionContext(ISmtpServerOptions options, TcpClient tcpClient) { Transaction = new SmtpMessageTransaction(); RemoteEndPoint = tcpClient.Client.RemoteEndPoint; Client = new NetworkClient(tcpClient.GetStream(), options.NetworkBufferSize, options.NetworkBufferReadTimeout); Properties = new Dictionary <string, object>(); }
/// <summary> /// Constructor. /// </summary> /// <param name="tcpClient">The TCP client that the session is connected with.</param> internal SmtpSessionContext(TcpClient tcpClient) { Transaction = new SmtpMessageTransaction(); RemoteEndPoint = tcpClient.Client.RemoteEndPoint; Client = new NetworkClient(tcpClient.GetStream()); Properties = new Dictionary <string, object>(); }
/// <summary> /// Constructor. /// </summary> /// <param name="options">The server options.</param> /// <param name="tcpClient">The TCP client that the session is connected with.</param> /// <param name="networkClient">The network client to use for communications.</param> internal SmtpSessionContext(ISmtpServerOptions options, TcpClient tcpClient, INetworkClient networkClient) { ServerOptions = options; Transaction = new SmtpMessageTransaction(); RemoteEndPoint = tcpClient.Client.RemoteEndPoint; NetworkClient = networkClient; Properties = new Dictionary <string, object>(); }
/// <summary> /// Constructor. /// </summary> /// <param name="tcpClient">The TCP client that the session is connected with.</param> internal SmtpSessionContext(TcpClient tcpClient) { Transaction = new SmtpMessageTransaction(); RemoteEndPoint = tcpClient.Client.RemoteEndPoint; Client = new NetworkClient(tcpClient.GetStream()); }