SToolkit.SocketNetwork
1.0.0
Kinerja tinggi, kuat, async TCPUDP soket klienserver.
Paket Nuget
Atau konsol Nuget
Install-Package SToolkit.SocketNetwork
#1 #2
Termasuk
using SToolkit . SocketNetwork ;
Buat server, TCP
SocketServer TcpServer = new SocketServer ( NetworkType . Tcp , IPAddress . Loopback , 5400 ) ;
atau UDP
SocketServer UdpServer = new SocketServer ( NetworkType . Udp , IPAddress . Loopback , 5401 ) ;
Kemudian ikat acara
Mulai server
TcpServer . Start ( ) ;
UdpServer . Start ( ) ;
Semua fungsi server
SocketServer ( NetworkType type , IPAddress address , int port ) ;
void Dispose ( ) ;
void Start ( ) ;
void Stop ( ) ;
Semua variabel server
string Uid ;
IPAddress IPAddress ;
int Port ;
List < ClientConnection > ConnectedClients ;
int LoopInterval ;
int Backlog ;
NetworkType ServerType ;
bool UDPClientManage ;
int UDPDataInterval ;
Termasuk
using SToolkit . SocketNetwork ;
Buat klien, TCP
SocketClient TcpClient = new SocketClient ( NetworkType . Tcp ) ;
atau UDP
SocketClient UdpClient = new SocketClient ( NetworkType . Udp ) ;
Mengikat acara
Hubungkan ke server jarak jauh
TcpClient . Connect ( IPAddress . Loopback , 5400 ) ;
UdpClient . Connect ( IPAddress . Loopback , 5401 ) ;
Semua fungsi klien
SocketClient ( NetworkType type ) ;
void Dispose ( ) ;
void Connect ( IPAddress address , int port ) ;
void Connect ( IPEndPoint point ) ;
void Disconnect ( ) ;
Semua variabel klien
NetworkType ClientType ;
int LoopInterval ;
int UDPDataInterval ;