HomeSort by relevance Sort by last modified time
    Searched refs:webSocket (Results 1 - 12 of 12) sorted by null

  /external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/
WebSocketEcho.java 6 import com.squareup.okhttp.ws.WebSocket;
13 import static com.squareup.okhttp.ws.WebSocket.PayloadType;
14 import static com.squareup.okhttp.ws.WebSocket.PayloadType.BINARY;
15 import static com.squareup.okhttp.ws.WebSocket.PayloadType.TEXT;
22 .url("ws://echo.websocket.org")
30 @Override public void onOpen(WebSocket webSocket, Request request, Response response)
32 webSocket.sendMessage(TEXT, new Buffer().writeUtf8("Hello..."));
33 webSocket.sendMessage(TEXT, new Buffer().writeUtf8("...World!"));
34 webSocket.sendMessage(BINARY, new Buffer().writeInt(0xdeadbeef))
    [all...]
  /external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/ws/
WebSocketCallTest.java 36 import static com.squareup.okhttp.ws.WebSocket.PayloadType.TEXT;
53 WebSocket webSocket = awaitWebSocket();
54 webSocket.sendPing(new Buffer().writeUtf8("Hello, WebSockets!"));
62 WebSocket webSocket = awaitWebSocket();
63 webSocket.sendMessage(TEXT, new Buffer().writeUtf8("Hello, WebSockets!"));
69 @Override public void onOpen(WebSocket webSocket, Request request, Response response)
71 webSocket.sendMessage(TEXT, new Buffer().writeUtf8("Hello, WebSockets!"))
    [all...]
AutobahnTester.java 70 private WebSocket webSocket;
72 @Override public void onOpen(WebSocket webSocket, Request request, Response response)
75 this.webSocket = webSocket;
78 @Override public void onMessage(BufferedSource payload, final WebSocket.PayloadType type)
87 webSocket.sendMessage(type, buffer);
121 @Override public void onOpen(WebSocket webSocket, Request request, Response response
    [all...]
WebSocketRecorder.java 28 import static com.squareup.okhttp.ws.WebSocket.PayloadType.BINARY;
29 import static com.squareup.okhttp.ws.WebSocket.PayloadType.TEXT;
36 void onMessage(BufferedSource payload, WebSocket.PayloadType type) throws IOException;
47 @Override public void onOpen(WebSocket webSocket, Request request, Response response) {
50 @Override public void onMessage(BufferedSource source, WebSocket.PayloadType type)
129 public final WebSocket.PayloadType type;
132 private Message(WebSocket.PayloadType type) {
  /external/okhttp/okhttp-ws/src/main/java/com/squareup/okhttp/ws/
WebSocketListener.java 24 import static com.squareup.okhttp.ws.WebSocket.PayloadType;
26 /** Listener for server-initiated messages on a connected {@link WebSocket}. */
28 void onOpen(WebSocket webSocket, Request request, Response response) throws IOException;
42 * WebSocket#sendPing(Buffer)} but might also be unsolicited.
48 * from a call to {@link WebSocket#close(int, String) close()} or as an unprompted
WebSocketCall.java 86 // Force HTTP/1.1 until the WebSocket over HTTP/2 version is finalized.
91 .header("Upgrade", "websocket")
93 .header("Sec-WebSocket-Key", key)
94 .header("Sec-WebSocket-Version", "13")
154 if (!"websocket".equalsIgnoreCase(headerUpgrade)) {
156 "Expected 'Upgrade' header value 'websocket' but was '" + headerUpgrade + "'");
158 String headerAccept = response.header("Sec-WebSocket-Accept");
161 throw new ProtocolException("Expected 'Sec-WebSocket-Accept' header value '"
178 final RealWebSocket webSocket =
181 // TODO connection.setOwner(webSocket);
    [all...]
  /external/nanohttpd/websocket/src/test/java/fi/iki/elonen/
WebSocketResponseHandlerTest.java 29 private WebSocket webSocket;
46 headers.put("upgrade", "websocket");
48 headers.put("sec-websocket-key", "x3JJHMbDL1EzLkh9GBhXDw==");
49 headers.put("sec-websocket-protocol", "chat, superchat");
50 headers.put("sec-websocket-version", "13");
53 when(webSocketFactory.openWebSocket(any(IHTTPSession.class))).thenReturn(webSocket);
54 when(webSocket.getHandshakeResponse()).thenReturn(response);
63 verify(webSocket).getHandshakeResponse();
68 assertHeader(0, "sec-websocket-accept", "HSmrc0sMlYUkAGmm5OPpG2HaGWk=")
    [all...]
  /external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
RecordedResponse.java 18 import com.squareup.okhttp.ws.WebSocket;
35 public final WebSocket webSocket;
39 public RecordedResponse(Request request, Response response, WebSocket webSocket, String body,
43 this.webSocket = webSocket;
  /external/nanohttpd/websocket/src/main/java/fi/iki/elonen/
WebSocketResponseHandler.java 12 public static final String HEADER_UPGRADE_VALUE = "websocket";
15 public static final String HEADER_WEBSOCKET_VERSION = "sec-websocket-version";
17 public static final String HEADER_WEBSOCKET_KEY = "sec-websocket-key";
18 public static final String HEADER_WEBSOCKET_ACCEPT = "sec-websocket-accept";
19 public static final String HEADER_WEBSOCKET_PROTOCOL = "sec-websocket-protocol";
34 "Invalid Websocket-Version " + headers.get(HEADER_WEBSOCKET_VERSION));
39 "Missing Websocket-Key");
42 WebSocket webSocket = webSocketFactory.openWebSocket(session);
43 Response handshakeResponse = webSocket.getHandshakeResponse()
    [all...]
  /external/jetty/src/java/org/eclipse/jetty/websocket/
WebSocketClientFactory.java 19 package org.eclipse.jetty.websocket;
70 private final static ByteArrayBuffer __ACCEPT = new ByteArrayBuffer.CaseInsensitive("Sec-WebSocket-Accept");
273 * WebSocket Client Selector Manager
428 .append("Upgrade: websocket\r\n")
430 .append("Sec-WebSocket-Key: ")
436 request.append("Sec-WebSocket-Version: ").append(WebSocketConnectionRFC6455.VERSION).append("\r\n");
439 request.append("Sec-WebSocket-Protocol: ").append(_future.getProtocol()).append("\r\n");
492 _error = "No Sec-WebSocket-Accept";
496 _error = "Bad Sec-WebSocket-Accept";
561 public WebSocketClientConnection(WebSocketClientFactory factory, WebSocket webSocket, EndPoint endPoint, WebSocketBuffers buffers, long timeStamp, int maxIdleTime, String pr (…)
    [all...]
  /external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/
MockWebServer.java 503 && "websocket".equalsIgnoreCase(request.getHeader("Upgrade"));
634 String key = request.getHeader("Sec-WebSocket-Key");
636 response.setHeader("Sec-WebSocket-Accept", acceptKey);
645 Util.threadFactory(String.format("MockWebServer %s WebSocket", request.getPath()),
648 final RealWebSocket webSocket =
673 listener.onOpen(webSocket, fancyRequest, fancyResponse);
679 }, "MockWebServer WebSocket Writer " + request.getPath()).start();
682 while (webSocket.readMessage()) {
    [all...]
  /prebuilts/tools/common/m2/repository/org/eclipse/jetty/jetty-websocket/8.1.14.v20131031/
jetty-websocket-8.1.14.v20131031.jar 

Completed in 175 milliseconds