MCPcopy
hub / github.com/socketio/socket.io-client-java / socket

Method socket

src/main/java/io/socket/client/Manager.java:373–382  ·  view source on GitHub ↗

Initializes Socket instances for each namespaces. @param nsp namespace. @param opts options. @return a socket instance for the namespace.

(final String nsp, Options opts)

Source from the content-addressed store, hash-verified

371 * @return a socket instance for the namespace.
372 */
373 public Socket socket(final String nsp, Options opts) {
374 synchronized (this.nsps) {
375 Socket socket = this.nsps.get(nsp);
376 if (socket == null) {
377 socket = new Socket(this, nsp, opts);
378 this.nsps.put(nsp, socket);
379 }
380 return socket;
381 }
382 }
383
384 public Socket socket(String nsp) {
385 return socket(nsp, null);

Calls 1

getMethod · 0.80