Class EasyUseSocket

java.lang.Object
cool.scx.socket_vertx.ScxSocket
cool.scx.socket_vertx.EasyUseSocket
Direct Known Subclasses:
ScxClientSocket, ScxServerSocket

public class EasyUseSocket extends ScxSocket
便于使用的 Socket
  • Method Details

    • send

      public final void send(String content)
    • send

      public final void send(Object data)
    • send

      public final void send(Object data, cool.scx.socket.SendOptions options)
    • sendEvent

      public final void sendEvent(String eventName)
    • sendEvent

      public final void sendEvent(String eventName, String data)
    • sendEvent

      public final void sendEvent(String eventName, Object data)
    • sendEvent

      public final void sendEvent(String eventName, Object data, cool.scx.socket.SendOptions options)
    • sendEvent

      public final void sendEvent(String eventName, Consumer<cool.scx.socket.ScxSocketResponse> responseCallback)
    • sendEvent

      public final void sendEvent(String eventName, Consumer<cool.scx.socket.ScxSocketResponse> responseCallback, cool.scx.socket.RequestOptions options)
    • sendEvent

      public final void sendEvent(String eventName, Object data, Consumer<cool.scx.socket.ScxSocketResponse> responseCallback)
    • sendEvent

      public final void sendEvent(String eventName, Object data, Consumer<cool.scx.socket.ScxSocketResponse> responseCallback, cool.scx.socket.RequestOptions options)
    • onEvent

      public final void onEvent(String eventName, Runnable onEvent)
    • onEvent

      public final <T> void onEvent(String eventName, Consumer<T> onEvent, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
    • onEvent

      public final void onEvent(String eventName, Supplier<?> onEvent)
    • onEvent

      public final <T> void onEvent(String eventName, Function<T,?> onEvent, com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)