Class ReceivedPongMessageEvent
java.lang.Object
de.craftsblock.craftscore.event.Event
de.craftsblock.craftsnet.events.sockets.message.ReceivedPongMessageEvent
- All Implemented Interfaces:
GenericSocketEventBase,GenericSocketMessageEventBase
public class ReceivedPongMessageEvent
extends de.craftsblock.craftscore.event.Event
implements GenericSocketMessageEventBase
An event indicating that a Pong message has been received.
- Since:
- 3.0.5-SNAPSHOT
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReceivedPongMessageEvent(SocketExchange exchange, @NotNull Frame frame) Constructs a ReceivedPongMessageEvent with the specified SocketExchange. -
Method Summary
Modifier and TypeMethodDescription@NotNull SocketExchangeGets theSocketExchangewhich stores the involved client, server and some other data.getFrame()Gets the incoming message as aFrameobject.byte @Nullable []Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.craftsblock.craftsnet.events.sockets.GenericSocketEventBase
getClient, getServerMethods inherited from interface de.craftsblock.craftsnet.events.sockets.message.GenericSocketMessageEventBase
getBuffer, getData, getOpcode, getUtf8
-
Constructor Details
-
ReceivedPongMessageEvent
Constructs a ReceivedPongMessageEvent with the specified SocketExchange.- Parameters:
exchange- The SocketExchange associated with the received Pong message.frame- Theframesend with the pong message.
-
-
Method Details
-
getExchange
Gets theSocketExchangewhich stores the involved client, server and some other data.- Specified by:
getExchangein interfaceGenericSocketEventBase- Returns:
- The
SocketExchange.
-
getFrame
Gets the incoming message as aFrameobject.- Specified by:
getFramein interfaceGenericSocketMessageEventBase- Returns:
- The incoming message.
-
getMessage
Deprecated, for removal: This API element is subject to removal in a future version.UseGenericSocketMessageEventBase.getData()instead.Retrieves the message as a byte array that was sent with the ping message.- Returns:
- The message as a byte array if present, otherwise null.
-
GenericSocketMessageEventBase.getData()instead.