System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening C# (CSharp) Метод

StartListening() приватный Метод

private StartListening ( Object data ) : void
data Object
Результат void
        public void StartListening(Object data)
        {
            InternalRemotingServices.RemotingTrace("HTTPChannel.StartListening");

            if (_port >= 0)
            {
                _tcpListener.Start(_bExclusiveAddressUse);
                _bListening = true;
                // get new port assignment if a port of 0 was used to auto-select a port
                if (_port == 0)
                {
                    _port = ((IPEndPoint)_tcpListener.LocalEndpoint).Port;
                    if (_channelData != null)
                    {
                        _channelData.ChannelUris = new String[1];
                        _channelData.ChannelUris[0] = GetChannelUri();
                    }
                }
                _tcpListener.BeginAcceptSocket(_acceptSocketCallback, null);
            }
        } // StartListening

Usage Example

        } // GetUrlsforURI

        /// <include file='doc\CombinedTcpChannel.uex' path='docs/doc[@for="TcpChannel.StartListening"]/*' />
        public void StartListening(Object data)
        {
            if (_serverChannel != null)
            {
                _serverChannel.StartListening(data);
            }
        } // StartListening