Package io.karatelabs.http
Class WsFrame
java.lang.Object
io.karatelabs.http.WsFrame
Immutable wrapper for WebSocket frames (text, binary, control frames).
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic WsFramebinary(byte[] content) static WsFrameclose()static WsFramebyte[]getBytes()intgetText()getType()booleanisBinary()booleanisClose()booleanisPing()booleanisPong()booleanisText()static WsFrameping()static WsFramepong()static WsFrametoString()
-
Method Details
-
text
-
binary
-
ping
-
pong
-
close
-
close
-
getType
-
isText
public boolean isText() -
isBinary
public boolean isBinary() -
isPing
public boolean isPing() -
isPong
public boolean isPong() -
isClose
public boolean isClose() -
getText
-
getBytes
public byte[] getBytes() -
getCloseCode
public int getCloseCode() -
getCloseReason
-
toString
-