Currently I am saving data to QuestDB through Python via the Influx Line Protocol (ILP) like so: If there is something wrong with my ilp_msg or the server or the DB, the above code will execute without raising any error. It will log into sdr out (or std err) on the DB. My question: how can I save data to
Tag: sockets
How to upload a file to server with Tkinter filedialog
I have a client that let user to browse a file and upload to a server. Currently I’m just using command terminal to operate the program. When user types in fup in the terminal, the program will ask for filename and the file will be uploaded to the server if the filename input by user is valid. So, what I
How to create a continuously running socket client in python
I have been using TCP socket for a while now in python and my socket client closes after sending a message but I want to create a continuously running socket client that will keep sending messages as I already have a continuously running listener server. So the socket client code which I like to work on is below: please advise
Why “[Errno 61] Connection refused” when program is listening on correct port, socket is bound to all interfaces?
I’ll try be concise, but please let me know if I can provide any more helpful pieces of information. I have client and server Python programs, and they work fine when ran on the same machine, and when the client connects to my machine’s local IP (not 127.0.0.1, but the IP assigned to my machine). I have not been able
How to decrease Image object size that dumped through pickle in Python
I’m working on a socket data transfer project. I want to watch client screen. I’m using pillow and pickle module both server and client but when I trying to send ImageGrab.grab() object, object size is 3Mb. It’s very high data for transferring. Although object size is 3MB, saved size (ImageGrab.grab().save(“example.jpg”)) is 200 kb. When i save file then read saved
Creating multiple tcp socket handlers from one class in Python
Is it possible in Python3 to create a TCP Socket handler class that can have multiple unique instances? I have 2 threaded TCP Socket servers that are providing unique information to the connected client. I am trying to make it so that ‘node 1’ socket server handler will provide only the data for ‘node 1’ while ‘node 2’ socket server
Retrieving unpack requires a buffer of 8 bytes error socket python
I have the following code I am sending the result of intermediate predictions results from the client to server. Client server While running the above code I am facing the below error msg_size = struct.unpack(“Q”, packed_msg_size)[0] struct.error: unpack requires a buffer of 8 bytes Thank you Answer You haven’t sorted out normal end of connection. As mentioned in the comments,
Python socket not delivering packet
I am creating a simple messaging server and client in Python using the socket library. First I am doing some validation and a key exchange before I let the user send messages. Every once and a while I get an issue where the server will send a message and the client won’t receive it and then the server will move
Python – non-blocking sockets using selectors
My Problem in short: I dont know how the selector knows which socket should read or write first. It is a Server that can handle multi connections and its flow should be: Server creates listening socket Client creates 2 sockets and connects them to the server Client 2 sockets send the messages Server 2 sockets echo those messages, client and
Send and receive objects through sockets in Python
I have searched a lot on the Internet, but I haven’t been able to find the solution to send an object over the socket and receive it as is. I know it needs pickling which I have already done. And that converts it to bytes and is received on the other hand. But how can I convert those bytes to