Skip to content

Tag: sockets

I can’t get a response from the server via socket python

I’m trying to send a string to the server, but I can’t send the data and get a response, what’s the problem, please help. When I connect to the server via netcat, everything is fine. Answer I was finally able to get a response from the server, it was because NetCat automatically adds n when …

How can I get a socket’s .recv() not to block?

I’m trying to write a simple daemon that listens for orders on a Unix socket. The following works, but the connection.recv(1024) line blocks, meaning I can’t kill the server gracefully: Ideally, I’d like to place all of this inside a Thread that checks a self.should_stop property every self.…

Push live updates through Socket

I need to pass live data from a python script to my server (made with FastApi) and from this server I need to pass all of them to a client (made with Angular). Currently I’m doing Http PUT requests from my script and then I’m using Websocket to pass the updates to the client. The problem is that w…