/// <summary> /// Create a new SessionBase object from the given IOThread, socket, and Address. /// </summary> /// <param name="ioThread">the IOThread for this session to run on</param> /// <param name="connect">this flag dictates whether to connect</param> /// <param name="socket">the socket to contain</param> /// <param name="options">Options that dictate the settings of this session</param> /// <param name="addr">an Address that dictates the protocol and IP-address to use when connecting</param> public SessionBase([NotNull] IOThread ioThread, bool connect, [NotNull] SocketBase socket, [NotNull] Options options, [NotNull] Address addr) : base(ioThread, options) { m_ioObject = new IOObject(ioThread); m_connect = connect; m_socket = socket; m_ioThread = ioThread; m_addr = addr; if (options.RawSocket) { m_identitySent = true; m_identityReceived = true; } m_terminatingPipes = new HashSet<Pipe>(); }