Home > Back-end >  Save multiple socket to the map, and then call elsewhere
Save multiple socket to the map, and then call elsewhere

Time:09-26

A HashMap m1=new HashMap ();
.
The socket=new socket (host, port);
M1. Put (port, socket);//socket saved
.
Like this I keep each user socket, then other place calls to how to write?
Private static Socket usocket=null;

//get the user of the socket
  • Related