Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between the socket , socketio, and websockets

Can someone explain me difference between socket, socketio, flask socketio with respect to python? And for using it this socket with flutter what code should I write on backend? Like I should write sever and client or only client?

like image 299
Atul Dubey Avatar asked Dec 01 '22 09:12

Atul Dubey


1 Answers

A socket is one endpoint of a two-way communication link between two programs running on the network. This is a very low-level thing, everything else is implemented on top of TCP sockets.

WebSocket is a standard communication protocol for the web. It allows for a full-duplex communication channel to be established between a client and a server.

Socket.IO is a communication protocol that builds on top of HTTP and WebSocket, providing extra features such as automatic reconnection, event-based notifications, etc.

Flask-SocketIO is an implementation of the Socket.IO server-side protocol as a Flask extension.

To access a Socket.IO server from your flutter application you need to use a Socket.IO client. I do not use flutter myself, so I cannot recommend one.

like image 121
Miguel Avatar answered Dec 04 '22 04:12

Miguel