Package com.adobe.granite.socketio
Interface SocketIOSocketListener
-
@ConsumerType public interface SocketIOSocketListener
Socket.IO Socket listener.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onDisconnect(String reason)
Called when a socket disconnects.void
onError(JSONArray data)
Called when an error occurredvoid
onEvent(String name, JSONArray data, SocketIOAck ack)
Called when a socket receives an event.
-
-
-
Method Detail
-
onEvent
void onEvent(@Nonnull String name, @Nonnull JSONArray data, @Nullable SocketIOAck ack)
Called when a socket receives an event. Theack
parameter is not-null if the client requested an 'ack' event. the listener should send the ack as soon as possible.- Parameters:
name
- name of the event.data
- event argumentsack
- notnull
if the client requested an ack.
-
onDisconnect
void onDisconnect(String reason)
Called when a socket disconnects.- Parameters:
reason
- informative reason
-
onError
void onError(JSONArray data)
Called when an error occurred- Parameters:
data
- error arguments
-
-