/// <summary> /// Opens endpoint by allocating transports (if necessary). /// ServerEndpoint can be Close() or Dispose() after it was open /// </summary> public void Open() { EnsureObjectNotDisposed(); if (m_IsOpen) { return; } m_Transport = m_Binding.OpenServerEndpoint(this); m_IsOpen = true; }
public void Close() { if (!m_IsOpen) { return; } m_Binding.CloseServerEndpoint(this); m_Transport = null; m_IsOpen = false; }
/// <summary> /// Creates instance of a transport that resulted from connection accept by /// listener. Not all technologies support listener/child transports (TCP does) /// </summary> protected ServerTransport(Binding binding, ServerTransport listener) : base(binding, TransportKind.Server) { m_Listener = listener; m_ServerEndpoint = listener.m_ServerEndpoint; }