These are my reading notes for Code Fellows
unidirectional:
bidirectional:
whenever we initiate the connection between client and server, the client-server made the handshaking and decide to create a new connection and this connection will keep alive until terminated by any of them. (source for this and images above)
…although you don’t need an HTTP server to regular websockets, there’s no denying that the websocket protocol was designed with HTTP in mind (as to allow HTTP and websocket servers to co-exist on the same TCP port).(source)
The message is sent to the server and awaits potential broadcast
It broadcasts the message to relevant clients
Unhandled messages are ignored, nothing happens
Always have handlers installed, then decide whether to do anything with the message or not in the handler (source)
A particular client that connects to a server
…defines an API establishing “socket” connections between a web browser and a server… There is an persistent connection between the client and the server and both parties can start sending data at any time. (source)
Socket.IO is a library that enables real-time, bidirectional and event-based communication between the browser and the server. (source)
Servers await ‘initiatives’ from these client programs (source)
The client is what sends a request to that server socket, and waits for a response. (source)
Computer processes that provide application services are referred to as servers, and create sockets on startup that are in the listening state. (source)
a server listens on a host and a port, receives requests (e.g. through a socket connection), and then sends a response to the client who initiated the socket connection. (source)
(source)
(source)
Transmission Control Protocol (TCP) is a transport protocol that is used on top of IP to ensure reliable transmission of packets. (source)
…a communications protocol that is primarily used for establishing low-latency and loss-tolerating connections between applications on the internet. It speeds up transmissions by enabling the transfer of data before an agreement is provided by the receiving party.
A packet consists of control information and user data; the latter is also known as the payload. Control information provides data for delivering the payload (source)