SToolkit.SocketNetwork
1.0.0
Cliente/servidor de socket TCPUDP asíncrono, potente y de alto rendimiento.
Paquete Nuget
O consola Nuget
Install-Package SToolkit.SocketNetwork
#1 #2
Incluido
using SToolkit . SocketNetwork ;
Crear servidor, TCP
SocketServer TcpServer = new SocketServer ( NetworkType . Tcp , IPAddress . Loopback , 5400 ) ;
o UDP
SocketServer UdpServer = new SocketServer ( NetworkType . Udp , IPAddress . Loopback , 5401 ) ;
Luego vincular eventos
Iniciar servidor
TcpServer . Start ( ) ;
UdpServer . Start ( ) ;
Todas las funciones del servidor
SocketServer ( NetworkType type , IPAddress address , int port ) ;
void Dispose ( ) ;
void Start ( ) ;
void Stop ( ) ;
Todas las variables del servidor
string Uid ;
IPAddress IPAddress ;
int Port ;
List < ClientConnection > ConnectedClients ;
int LoopInterval ;
int Backlog ;
NetworkType ServerType ;
bool UDPClientManage ;
int UDPDataInterval ;
Incluido
using SToolkit . SocketNetwork ;
Crear cliente, TCP
SocketClient TcpClient = new SocketClient ( NetworkType . Tcp ) ;
o UDP
SocketClient UdpClient = new SocketClient ( NetworkType . Udp ) ;
Vincular eventos
Conectarse al servidor remoto
TcpClient . Connect ( IPAddress . Loopback , 5400 ) ;
UdpClient . Connect ( IPAddress . Loopback , 5401 ) ;
Todas las funciones del cliente
SocketClient ( NetworkType type ) ;
void Dispose ( ) ;
void Connect ( IPAddress address , int port ) ;
void Connect ( IPEndPoint point ) ;
void Disconnect ( ) ;
Todas las variables del cliente
NetworkType ClientType ;
int LoopInterval ;
int UDPDataInterval ;