|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.nkzawa.emitter.Emitter
com.github.nkzawa.socketio.client.Socket
public class Socket
The socket class for Socket.IO Client.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.github.nkzawa.emitter.Emitter |
|---|
com.github.nkzawa.emitter.Emitter.Listener |
| Field Summary | |
|---|---|
static String |
EVENT_CONNECT
Called on a connection. |
static String |
EVENT_CONNECT_ERROR
|
static String |
EVENT_CONNECT_TIMEOUT
|
static String |
EVENT_DISCONNECT
Called on a disconnection. |
static String |
EVENT_ERROR
Called on a connection error. |
static String |
EVENT_MESSAGE
|
static String |
EVENT_RECONNECT
|
static String |
EVENT_RECONNECT_ATTEMPT
|
static String |
EVENT_RECONNECT_ERROR
|
static String |
EVENT_RECONNECT_FAILED
|
static String |
EVENT_RECONNECTING
|
| Constructor Summary | |
|---|---|
Socket(Manager io,
String nsp)
|
|
| Method Summary | |
|---|---|
Socket |
close()
Disconnects the socket. |
Socket |
connect()
Connects the socket. |
boolean |
connected()
|
Socket |
disconnect()
Disconnects the socket. |
com.github.nkzawa.emitter.Emitter |
emit(String event,
Object... args)
Emits an event. |
com.github.nkzawa.emitter.Emitter |
emit(String event,
Object[] args,
Ack ack)
Emits an event with an acknowledge. |
Manager |
io()
|
Socket |
open()
Connects the socket. |
Socket |
send(Object... args)
Send messages. |
| Methods inherited from class com.github.nkzawa.emitter.Emitter |
|---|
hasListeners, listeners, off, off, off, on, once |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EVENT_CONNECT
public static final String EVENT_DISCONNECT
public static final String EVENT_ERROR
Parameters:
public static final String EVENT_MESSAGE
public static final String EVENT_CONNECT_ERROR
public static final String EVENT_CONNECT_TIMEOUT
public static final String EVENT_RECONNECT
public static final String EVENT_RECONNECT_ERROR
public static final String EVENT_RECONNECT_FAILED
public static final String EVENT_RECONNECT_ATTEMPT
public static final String EVENT_RECONNECTING
| Constructor Detail |
|---|
public Socket(Manager io,
String nsp)
| Method Detail |
|---|
public Socket open()
public Socket connect()
public Socket send(Object... args)
args - data to send.
public com.github.nkzawa.emitter.Emitter emit(String event,
Object... args)
Ack at the last argument, then the acknowledge is done.
emit in class com.github.nkzawa.emitter.Emitterevent - an event name.args - data to send.
public com.github.nkzawa.emitter.Emitter emit(String event,
Object[] args,
Ack ack)
event - an event nameargs - data to send.ack - the acknowledgement to be called
public Socket close()
public Socket disconnect()
public Manager io()
public boolean connected()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||