Skip to content
Snippets Groups Projects
Commit 6c3ec86f authored by Corvus's avatar Corvus
Browse files

Use actual server name

- Fix socket import
parent 3b595ba9
Branches main
No related tags found
No related merge requests found
from socket import socket
import socket
def parse_response(client_socket: socket):
def parse_response(client_socket: socket.socket):
response_type = client_socket.recv(1)
response_string_length = int.from_bytes(client_socket.recv(4), "big")
......@@ -14,7 +14,7 @@ def parse_response(client_socket: socket):
print(response_string)
def send_string(string: str, client_socket: socket):
def send_string(string: str, client_socket: socket.socket):
string_bytes = string.encode("utf-8")
client_socket.send(len(string_bytes).to_bytes(4, "big"))
client_socket.send(string_bytes)
......@@ -33,8 +33,8 @@ def print_commands():
while True:
print_commands()
command = input("Enter Command: ")
client_socket = socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('127.0.0.1', 5080))
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('light.lan', 5080))
bye = False
if command == "1":
'''List Effects'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment