MCPcopy Index your code
hub / github.com/TooTallNate/Java-WebSocket / WebSocket

Interface WebSocket

src/main/java/org/java_websocket/WebSocket.java:39–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37import org.java_websocket.protocols.IProtocol;
38
39public interface WebSocket {
40
41 /**
42 * sends the closing handshake. may be send in response to an other handshake.
43 *
44 * @param code the closing code
45 * @param message the closing message
46 */
47 void close(int code, String message);
48
49 /**
50 * sends the closing handshake. may be send in response to an other handshake.
51 *
52 * @param code the closing code
53 */
54 void close(int code);
55
56 /**
57 * Convenience function which behaves like close(CloseFrame.NORMAL)
58 */
59 void close();
60
61 /**
62 * This will close the connection immediately without a proper close handshake. The code and the
63 * message therefore won't be transferred over the wire also they will be forwarded to
64 * onClose/onWebsocketClose.
65 *
66 * @param code the closing code
67 * @param message the closing message
68 **/
69 void closeConnection(int code, String message);
70
71 /**
72 * Send Text data to the other end.
73 *
74 * @param text the text data to send
75 * @throws WebsocketNotConnectedException websocket is not yet connected
76 */
77 void send(String text);
78
79 /**
80 * Send Binary data (plain bytes) to the other end.
81 *
82 * @param bytes the binary data to send
83 * @throws IllegalArgumentException the data is null
84 * @throws WebsocketNotConnectedException websocket is not yet connected
85 */
86 void send(ByteBuffer bytes);
87
88 /**
89 * Send Binary data (plain bytes) to the other end.
90 *
91 * @param bytes the byte array to send
92 * @throws IllegalArgumentException the data is null
93 * @throws WebsocketNotConnectedException websocket is not yet connected
94 */
95 void send(byte[] bytes);
96

Callers 74

mainMethod · 0.65
successTestsMethod · 0.65
onOpenMethod · 0.65
testIssueMethod · 0.65
successTestsMethod · 0.65
onMessageMethod · 0.65
onMessageMethod · 0.65
onOpenMethod · 0.65
batchMethod · 0.65
resetMethod · 0.65
runMethod · 0.65

Implementers 2

WebSocketImplsrc/main/java/org/java_websocket/WebSo
WebSocketClientsrc/main/java/org/java_websocket/clien

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…