Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 519 Bytes

README.md

File metadata and controls

16 lines (14 loc) · 519 Bytes

Simple Socket Client And Server Usage:

Listening:

 NetworkHandler.UDPNetwork server = new NetworkHandler.UDPNetwork(new System.Net.IPEndPoint(IPAddress.Any, 1234), NetworkHandler.NetworkBase.Modes.Server, System.Net.Sockets.AddressFamily.InterNetwork);
 server.OnPacketReceived += Server_OnPacketReceived;
 server.Start();

Receiving Data:

private static void Server_OnPacketReceived(object sender, NetworkHandler.NetworkEventHandler e)
{
  Console.WriteLine(Encoding.ASCII.GetString(e.Packet));
}