goalc: make suggested changes, still can't reconnect properly

This commit is contained in:
Tyler Wilding
2022-04-30 21:33:27 -04:00
parent 8ffcb49cf8
commit 0a74c9ad9d
10 changed files with 131 additions and 162 deletions
+5 -6
View File
@@ -1,16 +1,15 @@
import socket
import time
import struct
clientSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM);
clientSocket.connect(("127.0.0.1", 8181))
print(clientSocket)
data = clientSocket.recv(1024)
print(data.decode())
print("...?")
form = "(repl-help)"
num_sent = clientSocket.send(b'\x0B\x00\x00\x00\x0A\x00\x00\x00' + form.encode())
print("Sent {} bytes".format(num_sent))
header = struct.pack('<II', len(form), 10)
num_sent = clientSocket.sendall(header + form.encode())
# this shouldn't be necessary but...this is just a test script
# might imply something is wrong in the C++ code!
time.sleep(1000000)