I am taking screenshot using ImageGrab from PIL library and want to send same from server to client.
I am able to send messages bidirectionally. but can't figure out sending objects or anything other than messages
Server Code :
Client Code:
If you can, please replace code with image i am trying to send
Thanks 🎉
I am able to send messages bidirectionally. but can't figure out sending objects or anything other than messages
Server Code :
Code
import socket
import cv2
from PIL import ImageGrab
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysocket.bind(("xx.xx.xx.xx",6666))
mysocket.listen(5)
(client, (ip, port)) = mysocket.accept()
image = ImageGrab.grab()
msg = "test"
client.send(msg.encode())
#
#
#Client Code:
Code
import socket
import cv2
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysocket.connect(("xx.xx.xx.xx",6666))
data = mysocket.recv(1024)
print(data)If you can, please replace code with image i am trying to send
Thanks 🎉
Founder - supercmd.sh SuperIsland

