- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 162 for Websockets (0.12 sec)
-
docs_src/websockets/tutorial003.py
self.active_connections: List[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket): await websocket.send_text(message)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 13:52:19 UTC 2020 - 2.5K bytes - Viewed (0) -
tests/test_ws_router.py
@router.websocket("/router2") async def routerindex2(websocket: WebSocket): await websocket.accept() await websocket.send_text("Hello, router!") await websocket.close() @router.websocket("/router/{pathparam:path}") async def routerindexparams(websocket: WebSocket, pathparam: str, queryparam: str): await websocket.accept() await websocket.send_text(pathparam) await websocket.send_text(queryparam)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 19:08:14 UTC 2023 - 7.5K bytes - Viewed (0) -
tests/test_ws_dependencies.py
@app.websocket("/", dependencies=[create_dependency("index")]) async def index(websocket: WebSocket, deps: DepList): await websocket.accept() await websocket.send_text(json.dumps(deps)) await websocket.close() @router.websocket("/router", dependencies=[create_dependency("routerindex")]) async def routerindex(websocket: WebSocket, deps: DepList): await websocket.accept()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 20:35:39 UTC 2023 - 2.1K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/RtmSession.java
@Override public void onMessage(WebSocket webSocket, String text) { System.out.println("onMessage: " + text); } @Override public void onClosing(WebSocket webSocket, int code, String reason) { webSocket.close(1000, null); System.out.println("onClose (" + code + "): " + reason); } @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Nov 19 20:16:58 UTC 2016 - 2.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
client.dispatcher().executorService().shutdown(); } @Override public void onOpen(WebSocket webSocket, Response response) { webSocket.send("Hello..."); webSocket.send("...World!"); webSocket.send(ByteString.decodeHex("deadbeef")); webSocket.close(1000, "Goodbye, World!"); } @Override public void onMessage(WebSocket webSocket, String text) { System.out.println("MESSAGE: " + text); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 04 11:40:21 UTC 2024 - 1.6K bytes - Viewed (0) -
tests/test_route_scope.py
route: APIWebSocketRoute = websocket.scope["route"] await websocket.accept() await websocket.send_json({"item_id": item_id, "path": route.path}) client = TestClient(app) def test_get(): response = client.get("/users/rick") assert response.status_code == 200, response.text assert response.json() == {"user_id": "rick", "path": "/users/{user_id}"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/WebSocketListener.kt
* messages. */ open fun onOpen( webSocket: WebSocket, response: Response, ) { } /** Invoked when a text (type `0x1`) message has been received. */ open fun onMessage( webSocket: WebSocket, text: String, ) { } /** Invoked when a binary (type `0x2`) message has been received. */ open fun onMessage( webSocket: WebSocket, bytes: ByteString, ) { } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
docs_src/websockets/tutorial001.py
</body> </html> """ @app.get("/") async def get(): return HTMLResponse(html) @app.websocket("/ws") async def websocket_endpoint(websocket: WebSocket): await websocket.accept() while True: data = await websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt
* Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits=15 * Sec-WebSocket-Extensions: permessage-deflate; client_no_context_takeover * Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits="15" * Sec-WebSocket-Extensions: permessage-deflate; server_max_window_bits=15 * Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover * Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/net/HttpHeadersTest.java
.put("SEC_WEBSOCKET_ACCEPT", "Sec-WebSocket-Accept") .put("SEC_WEBSOCKET_EXTENSIONS", "Sec-WebSocket-Extensions") .put("SEC_WEBSOCKET_KEY", "Sec-WebSocket-Key") .put("SEC_WEBSOCKET_PROTOCOL", "Sec-WebSocket-Protocol") .put("SEC_WEBSOCKET_VERSION", "Sec-WebSocket-Version") .put("X_WEBKIT_CSP", "X-WebKit-CSP")
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 22 21:08:08 UTC 2024 - 3.9K bytes - Viewed (0)