Ejemplo n.º 1
0
        private MessageHost AcceptClient(TcpClient client)
        {
            var host = new MessageHost(client, messageRegistry);

            host.ThreadException += Host_OnThreadException;
            host.Stopped         += Host_Stopped;
            hostList.Add(host);
            return(host);
        }
Ejemplo n.º 2
0
        protected virtual void BeginOnConnectionReceived(MessageHost host)
        {
            if (ConnectionReceived == null)
            {
                return;
            }

            var args = new TcpConnectionReceivedEventArgs(host);

            ConnectionReceived?.BeginInvoke(this, args, EndOnConnectionReceived, args);
        }
Ejemplo n.º 3
0
        public TcpConnectionReceivedEventArgs(MessageHost host)
        {
            this.Host = host;

            Accept = true;
        }