Blender-Pipeline/network/test_client.py
Jeison Yehuda Amihud (Blender Dumbass) ba370b7cb1 Multiuser Alpha 1.0
This is the historic moment When the multiuser was implemented.
2021-01-02 23:31:37 +00:00

38 lines
736 B
Python

# GNU General Public License
# This script is for developers of VCStudio. This one is going to simulate the
# VCStudio client. But in a way where you have more control.
# This is a dumb script so deal with it.
import socket
print("What is te IP of the server?")
ip = input("IP: ")
port = 64646
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
# Now let's talk to the server
while True:
# Simple cycle of receive / write
# RECIEVE
data = sock.recv(1024)
data = data.decode('utf8')
print(data)
# WRITE
message = input(">>> ")
if message == "exit":
exit()
message = bytes(message, 'utf-8')
sock.sendall(message)