Package com.corundumstudio.socketio
Interface SocketIOClient
- All Superinterfaces:
ClientOperations
,Store
- All Known Implementing Classes:
NamespaceClient
Fully thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionGet all rooms a client is joined in.int
getCurrentRoomSize
(String room) Get current room Size (contain in cluster)Handshake data used during client connectionClient namespaceGet client remote addressClient session id, usesUUID
objectCurrent client transport protocolboolean
Check is underlying channel openvoid
Join client to roomvoid
Join client to roomvoid
send
(Packet packet, AckCallback<?> ackCallback) Send packet with ack callbackvoid
sendEvent
(String name, AckCallback<?> ackCallback, Object... data) Send event with ack callbackMethods inherited from interface com.corundumstudio.socketio.ClientOperations
disconnect, send, sendEvent
-
Method Details
-
getHandshakeData
HandshakeData getHandshakeData()Handshake data used during client connection- Returns:
- HandshakeData
-
getTransport
Transport getTransport()Current client transport protocol- Returns:
- transport protocol
-
sendEvent
Send event with ack callback- Parameters:
name
- - event namedata
- - event dataackCallback
- - ack callback
-
send
Send packet with ack callback- Parameters:
packet
- - packet to sendackCallback
- - ack callback
-
getNamespace
SocketIONamespace getNamespace()Client namespace- Returns:
- - namespace
-
getSessionId
UUID getSessionId()Client session id, usesUUID
object- Returns:
- - session id
-
getRemoteAddress
SocketAddress getRemoteAddress()Get client remote address- Returns:
- remote address
-
isChannelOpen
boolean isChannelOpen()Check is underlying channel open- Returns:
true
if channel open, otherwisefalse
-
joinRoom
Join client to room- Parameters:
room
- - name of room
-
leaveRoom
Join client to room- Parameters:
room
- - name of room
-
getAllRooms
Get all rooms a client is joined in.- Returns:
- name of rooms
-
getCurrentRoomSize
Get current room Size (contain in cluster)- Parameters:
room
- - name of room- Returns:
- int
-