Skip to content
Advertisement

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

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

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

Advertisement