-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule,com.facebook.react.bridge.ReactModuleWithSpec,com.facebook.react.turbomodule.core.interfaces.TurboModule
public final class WebSocketModule extends NativeWebSocketModuleSpec
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceWebSocketModule.ContentHandler
-
Constructor Summary
Constructors Constructor Description WebSocketModule(ReactApplicationContext context)
-
Method Summary
Modifier and Type Method Description StringgetName()voidsetContentHandler(int id, WebSocketModule.ContentHandler contentHandler)voidconnect(String url, @Nullable() ReadableArray protocols, @Nullable() ReadableMap options, double socketID)voidclose(double code, String reason, double socketID)voidsend(String message, double socketID)voidsendBinary(String base64String, double socketID)voidsendBinary(ByteString byteString, int id)voidping(double socketID)voidaddListener(String eventName)voidremoveListeners(double count)-
Methods inherited from class com.facebook.fbreact.specs.NativeWebSocketModuleSpec
connect, send, sendBinary -
Methods inherited from class com.facebook.react.bridge.BaseJavaModule
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
WebSocketModule
WebSocketModule(ReactApplicationContext context)
-
-
Method Detail
-
setContentHandler
void setContentHandler(int id, WebSocketModule.ContentHandler contentHandler)
-
connect
void connect(String url, @Nullable() ReadableArray protocols, @Nullable() ReadableMap options, double socketID)
-
sendBinary
void sendBinary(String base64String, double socketID)
-
sendBinary
void sendBinary(ByteString byteString, int id)
-
ping
void ping(double socketID)
-
addListener
void addListener(String eventName)
-
removeListeners
void removeListeners(double count)
-
-
-
-