Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace TestSeverDemo
{
class Program
{
static void Main(string[] args)
{
MessageProcesser MP = new MessageProcesser();
UDPLayer server = new UDPLayer();
server.MessageHandler += MP.ConsumeMessage;
server.StartServer("192.168.0.105", 6666);
Console.ReadLine();
server.StopServer();
}
}
}