示例#1
0
        protected override void DoStart()
        {
            base.DoStart();

            m_ClientSites = new Registry <clientSiteState>();

            m_Listener = Binding.SocketFactory.MakeListener(this, new IPEndPoint(m_IPAddress, m_Port), socketReceiveAction);
        }
示例#2
0
 protected override void DoWaitForCompleteStop()
 {
     if (m_Listener != null)
     {
         m_Listener.Dispose();
         m_Listener = null;
     }
     m_ClientSites = null;
 }
示例#3
0
 protected internal MpxServerSocket(MpxListener listener,
                                    IPEndPoint clientEndPoint,
                                    ClientSite clientSite,
                                    MpxSocketReceiveAction <MpxServerTransport> receiveAction
                                    ) : base(listener.Transport, clientEndPoint, clientSite, receiveAction)
 {
     m_Listener = listener;
     listener.Transport.ClientSiteConnected(this);
 }
示例#4
0
        internal MpxWinServerSocket(MpxListener listener,
                                    TcpClient client,
                                    ClientSite clientSite,
                                    MpxSocketReceiveAction <MpxServerTransport> receiveAction
                                    ) : base(listener, (IPEndPoint)client.Client.RemoteEndPoint, clientSite, receiveAction)
        {
            m_Client = client;
            m_Socket = m_Client.Client;

            m_RArgs            = new SocketState(m_Client.Client, m_ReceiveChunk.GetBuffer());
            m_RArgs.Completed += socketCallback;

            initiateReceive();
        }