示例#1
0
 public MyServer(int port,MySign sign)
 {
     _port = port;
     mysign = sign;
 }
示例#2
0
 public void StartListen()
 {
     _point = new IPEndPoint(_hostIP,_port);
     if (_socket != null)
     {
         try
         {
             _socket.Close();
         }
         catch { }
     }
     IPAddress multicastIpAddress = IPAddress.Parse("224.0.0.1");
     _socket = new UdpClient(_port,AddressFamily.InterNetwork);
     _socket.EnableBroadcast = true;
     _socket.JoinMulticastGroup(multicastIpAddress, 50);
     _socket.EnableBroadcast = true;
     if (mysign == null)
     {
         mysign = new MySign();
         mysign.sign = true;
     }
     MyProcess();
 }
示例#3
0
 public MainFrm()
 {
     mysign=new MySign();
     InitializeComponent();
 }