Example #1
0
        void StartSocket(int port)
        {
            socket = new AresUdpSocket(new ChannelFormatter());

            socket.PacketReceived += UdpPacketReceived;
            socket.Bind(new IPEndPoint(IPAddress.Any, port));

            udptimer.Change(TimeSpan.Zero, ticklength);

            IsRunning = true;
            socket.ReceiveAsync();
        }
Example #2
0
        void StartSocket()
        {
            socket = new AresUdpSocket(new ChannelFormatter());

            socket.Exception      += SocketException;
            socket.PacketReceived += PacketReceived;

            socket.Bind(new IPEndPoint(IPAddress.Any, server.Config.Port));

            timer.Change(TimeSpan.Zero, ticklength);

            socket.ReceiveAsync();
        }