-
- 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 interface
WebSocketModule.ContentHandler
-
Constructor Summary
Constructors Constructor Description WebSocketModule(ReactApplicationContext context)
-
Method Summary
Modifier and Type Method Description String
getName()
void
setContentHandler(int id, WebSocketModule.ContentHandler contentHandler)
void
connect(String url, @Nullable() ReadableArray protocols, @Nullable() ReadableMap options, double socketID)
void
close(double code, String reason, double socketID)
void
send(String message, double socketID)
void
sendBinary(String base64String, double socketID)
void
sendBinary(ByteString byteString, int id)
void
ping(double socketID)
void
addListener(String eventName)
void
removeListeners(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)
-
-
-
-