public ClientUdp() { client = new SimpleUdpClient(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 0), new IPEndPoint(IPAddress.Parse("127.0.0.1"), 11001)); client.OnException += Client_OnException; client.OnMessageReceived += Client_OnMessageReceived; client.Start(); }
public ServerUdp() { server = new SimpleUdpClient(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 11001)); server.OnMessageReceived += Server_OnMessageReceived; server.OnException += Server_OnException; server.Start(); }
public static SimpleUdpLog Create(string ipaddr, string logger) { if (!clients.ContainsKey(ipaddr)) { var temp = new SimpleUdpClient(); temp.Create(ipaddr, port); clients.Add(ipaddr, temp); } var client = clients[ipaddr]; return(new SimpleUdpLog(client, logger)); }