WebSocketServer server=new WebSocketServer (ws://0.0.0.0: "8002");
Server. Start (socket=& gt;
{
Socket. The OnOpen ()==& gt;//connection is established event
{
};
Socket. OnClose=()=& gt;//connection is closed event
{
};
Socket. The OnMessage message==& gt;//to accept client message event
{
Chat rooms, directly forward SendMsg to specify a user here, more users will jam, how to do???????
};
});
CodePudding user response:
All right.. The somebody else is asynchronous.. You just write directly.I used this relatively lightweight rather easy to use..