Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            PanelChat.BringToFront();
            RchtxtChat.BringToFront();
            RchtxtLog.BringToFront();

            members            = new List <Member>();
            pendingConnections = new List <IPAddress>();

            Global.Init();
            Broadcaster.Init();

            Log("My IP: " + Global.lanIp);
            Log("Mask: " + Global.lanMask);
            Log("Broad address: " + Broadcaster.broadAddr);

            Broadcaster.OnNewBroadcast = OnBroadcastReceived;
            Broadcaster.MemberCheck    = MemberAbsent;

            // Create tcp receiver socket
            tcpAccepter = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            tcpAccepter.Bind(Global.localEp);
        }