SToolkit.SocketNetwork
1.0.0
High performance, powerful, async TCPUDP socket clientserver.
Nuget Package
Or Nuget console
Install-Package SToolkit.SocketNetwork
#1 #2
Including
using SToolkit.SocketNetwork;
Create server, TCP
SocketServer TcpServer = new SocketServer(NetworkType.Tcp, IPAddress.Loopback, 5400);
or UDP
SocketServer UdpServer = new SocketServer(NetworkType.Udp, IPAddress.Loopback, 5401);
Then bind events
Start server
TcpServer.Start();
UdpServer.Start();
All server functions
SocketServer(NetworkType type, IPAddress address, int port);
void Dispose();
void Start();
void Stop();
All server variables
string Uid;
IPAddress IPAddress;
int Port;
List<ClientConnection> ConnectedClients;
int LoopInterval;
int Backlog;
NetworkType ServerType;
bool UDPClientManage;
int UDPDataInterval;
Including
using SToolkit.SocketNetwork;
Create client, TCP
SocketClient TcpClient = new SocketClient(NetworkType.Tcp);
or UDP
SocketClient UdpClient = new SocketClient(NetworkType.Udp);
Bind events
Connect to remote server
TcpClient.Connect(IPAddress.Loopback, 5400);
UdpClient.Connect(IPAddress.Loopback, 5401);
All client functions
SocketClient(NetworkType type);
void Dispose();
void Connect(IPAddress address, int port);
void Connect(IPEndPoint point);
void Disconnect();
All client variables
NetworkType ClientType;
int LoopInterval;
int UDPDataInterval;