Websockets in Python

preview_player
Показать описание
WebSocket is a protocol for machine-to-machine communication that keeps a TCP connection open for bi-directional passing of information. The websocket is a connection between two computers. The connection can be used to either send or receive information from either computer. The websocket can be configured as a server or client. A websocket server listens for requests and returns a result based on the input. The server can also function as a client by sending information without a specific request.

Рекомендации по теме
Комментарии
Автор

Wow! Can’t believe this content is free. I’ve been trying to build an NHS Consultation Assistant but I’m struggling to debug my code and so I’ve decided to take a step back and fully understand websockets. Thank you so much for this and the free course on your website!

cheybrown
Автор

Thank you, nerdy Tony Hawk. This was super helpful, and exactly what i needed!

TommyToness
Автор

Thank you for this video, it was really helpful!

abdullahyousef
Автор

Thanks so much for this video! It was very helpful. I am now wondering, how could you introduce authentication in order to connect to the websocket server? e.g. as you would with a Bearer Token when using RESTful APIs. Thanks a gain! Cheers!

IsraelAlfaro
Автор

is there a reason you nest the uri within a function rather than being declared outside as a variable that can easier be visually identified when needing to be changed? (say going from dev to production)

Hallucinarix
Автор

if my server also has to handle api calls, how can I combine that? I know how to asnyc it, but my issue is the server IP. Locally I use fast api and a ws endpoint. But once deployed with https protocol, the ws endpoint no longer works

Anorch-oyjk
Автор

This works fine. But each client has its own socket with the server. Is there a way to make it like all clients see the changes other client does on server?
For example having them connected to the same socket, or server sends info via each socket once DB changes?

georgigeorgiev
Автор

can you make a tutoriel—if possible—on sending HTML over websocket without js

UncleDavid
Автор

I know it’s a stupid question but aren’t websockets requiring internet to work?

alaaosama
Автор

thanks for such comprehensive sharing!!
I have one question, are there any suggested solutions that allow me to deploy my websocket server to let external devices access it through link like wss:// ?

chenbruce
Автор

all this could be. done with just an http server, dont think the websocket usecase was truly explored

AnamitraDey-vw
Автор

is there a reason you nested the uri within the function rather than an outside variable that's easier to visually identify? (say when needing to change when going from dev to production)

Hallucinarix