Interface GenericSocketMessageEventBase
- All Superinterfaces:
GenericSocketEventBase
- All Known Implementing Classes:
IncomingSocketMessageEvent,OutgoingSocketMessageEvent,ReceivedPingMessageEvent,ReceivedPongMessageEvent
Represents the base for all websocket message events.
- Since:
- 3.4.0-SNAPSHOT
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ByteBufferGets the incoming message as aByteBufferobject.default byte @NotNull []getData()Gets the incoming message as a byte array.getFrame()Gets the incoming message as aFrameobject.default OpcodeGets the opcode used when sending the data.default StringgetUtf8()Gets the incoming message as an utf8 encoded string.Methods inherited from interface de.craftsblock.craftsnet.events.sockets.GenericSocketEventBase
getClient, getExchange, getServer
-
Method Details
-
getFrame
Frame getFrame()Gets the incoming message as aFrameobject.- Returns:
- The incoming message.
-
getBuffer
Gets the incoming message as aByteBufferobject.- Returns:
- The incoming message.
-
getData
default byte @NotNull [] getData()Gets the incoming message as a byte array.- Returns:
- The incoming message data.
-
getUtf8
Gets the incoming message as an utf8 encoded string.- Returns:
- The incoming message.
-
getOpcode
Gets the opcode used when sending the data.- Returns:
- The opcode of the message.
-