Package io.socket.client
Class Manager
java.lang.Object
io.socket.emitter.Emitter
io.socket.client.Manager
public class Manager
extends io.socket.emitter.Emitter
Manager class represents a connection to a given Socket.IO server.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static class
Nested classes/interfaces inherited from class io.socket.emitter.Emitter
io.socket.emitter.Emitter.Listener
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Called on a disconnection.static final String
static final String
Called on a successful connection.static final String
static final String
Called on a successful reconnection.static final String
static final String
Called on a reconnection attempt error.static final String
static final String
Called when a new transport is created. -
Constructor Summary
ConstructorDescriptionManager()
Manager
(Manager.Options opts) Manager
(URI uri, Manager.Options opts) -
Method Summary
Modifier and TypeMethodDescriptionboolean
open()
Connects the client.final double
randomizationFactor
(double v) boolean
reconnection
(boolean v) int
reconnectionAttempts
(int v) final long
reconnectionDelay
(long v) final long
reconnectionDelayMax
(long v) socket
(String nsp, Manager.Options opts) InitializesSocket
instances for each namespaces.long
timeout()
timeout
(long v) Methods inherited from class io.socket.emitter.Emitter
emit, hasListeners, listeners, off, off, off, on, once
-
Field Details
-
EVENT_OPEN
Called on a successful connection.- See Also:
-
EVENT_CLOSE
Called on a disconnection.- See Also:
-
EVENT_PACKET
- See Also:
-
EVENT_ERROR
- See Also:
-
EVENT_RECONNECT
Called on a successful reconnection.- See Also:
-
EVENT_RECONNECT_ERROR
Called on a reconnection attempt error.- See Also:
-
EVENT_RECONNECT_FAILED
- See Also:
-
EVENT_RECONNECT_ATTEMPT
- See Also:
-
EVENT_TRANSPORT
Called when a new transport is created. (experimental)- See Also:
-
-
Constructor Details
-
Manager
public Manager() -
Manager
-
Manager
-
Manager
-
-
Method Details
-
reconnection
public boolean reconnection() -
reconnection
-
isReconnecting
public boolean isReconnecting() -
reconnectionAttempts
public int reconnectionAttempts() -
reconnectionAttempts
-
reconnectionDelay
public final long reconnectionDelay() -
reconnectionDelay
-
randomizationFactor
public final double randomizationFactor() -
randomizationFactor
-
reconnectionDelayMax
public final long reconnectionDelayMax() -
reconnectionDelayMax
-
timeout
public long timeout() -
timeout
-
open
-
open
Connects the client.- Parameters:
fn
- callback.- Returns:
- a reference to this object.
-
socket
InitializesSocket
instances for each namespaces.- Parameters:
nsp
- namespace.opts
- options.- Returns:
- a socket instance for the namespace.
-
socket
-