Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="port"></param>
 public void StartListening(int port)
 {
     this.port = port;
     Console.WriteLine(this.server_name + " StartListening: " + NetworkInformation.IPv4Address + ":" + this.port.ToString());
     this.ConnectionSocket = SocketUtil.Bind(new IPEndPoint(NetworkInformation.IPv4Address, this.port));
     this.StartReading();
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="port"></param>
        public void StartListening(int port)
        {
            Console.WriteLine(this.server_name + " StartListening: " + NetworkInformation.IPv4Address + ":" + port.ToString());

            frm.Set_TextBox(this.server_name + " StartListening: " + NetworkInformation.IPv4Address + ":" + port.ToString());

            this.ConnectionSocket = SocketUtil.Bind(new IPEndPoint(NetworkInformation.IPv4Address, port));
            //this.ConnectionSocket.Listen(port);
            this.ConnectionSocket.Accept();
            this.StartReceiveing();
        }