,
//the current online client dictionary, and ID binding
DictionaryDicOnlineClients;
Binding:
//to the current online client list add the client
DicOnlineClients. Add (playerID, packet. _peer);
Then send a friend request with this ID through this ID to bind Socket, if the client has no offline
//get the ID of the Socket
The Socket Socket;
If (DicOnlineClients. TryGetValue (FriendID, out socket))
{
$_server. Send (SendStream, socket);
}
But The problem is, when The Send, an error of The operation is not allowed on non - connected sockets.
But my client socket is obviously online
Please help solve the great god, or any other method, is used to specify the client sends data, here I use is by the player ID identification