What is the ws://?
Asked Answered
C

3

6

I was inspecting the stackoverflow pages for curiosity and noticed that interesting url: ws://sockets-se.or.stackexchange.com/

enter image description here

I would like to know more about the ws protocol but I don't even know how to start searching because searching for ws or ws protocol is not showing me the results that I was expecting...

What is this protocol? Can someone point me to a direction?

Contemplation answered 11/12, 2012 at 13:12 Comment(1)
Web SocketsJenelljenelle
O
7

ws: This is the new URL schema for WebSocket connections. There is also wss: for secure WebSocket connection the same way https: is used for secure HTTP connections.

By Definition

The WebSocket specification defines an API establishing "socket" connections between a web browser and a server.

In plain words

There is an persistent connection between the client and the server and both parties can start sending data at any time. That is a full-duplex communication channels over a single TCP connection.

Take a look here for API and here for web sockets basics and here for a simple live demo of it.

Overheat answered 11/12, 2012 at 13:27 Comment(0)
S
9

ws:// is the URI scheme for WebSockets. They provide full-duplex communications over a single TCP connection. You often see them used for asynchronous streaming of data to the browser... for say, a chat application or a browser-based game.

Consequently, because it's used for streaming data, clicking the Response tab in the Chrome Developer Tools won't show you data for the connection like you'd expect. Chrome, for example, would show you the "frames" sent over the connection with their given directionality, etc.

Spelter answered 11/12, 2012 at 13:14 Comment(0)
O
7

ws: This is the new URL schema for WebSocket connections. There is also wss: for secure WebSocket connection the same way https: is used for secure HTTP connections.

By Definition

The WebSocket specification defines an API establishing "socket" connections between a web browser and a server.

In plain words

There is an persistent connection between the client and the server and both parties can start sending data at any time. That is a full-duplex communication channels over a single TCP connection.

Take a look here for API and here for web sockets basics and here for a simple live demo of it.

Overheat answered 11/12, 2012 at 13:27 Comment(0)
S
3

This is for the websocket protocol

http://en.wikipedia.org/wiki/WebSocket

https://www.rfc-editor.org/rfc/rfc6455

Other documents you can find if you use a searchengine and search for Websockets

Stereogram answered 11/12, 2012 at 13:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.