Example to connect:
func connectToServer(ip, port):
client = StreamPeerTCP.new()
client.connect(ip, port)
Then in my update
, I use: (this might be where my problem is)
if client.is_connected() && client.get_available_bytes() >0:
print(str(client.get_string(client.get_available_bytes())))
Now, I'm running a basic TCP Server in nodejs
. If I do:
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
socket.write('PATCH 1.10')
It actually doesn't send as individual messages, so when I get my string from get_string
(above) I receive:

Is there a way to make it so each time a message (packet) is sent, they come as individual packets instead of added to the TCP Stream? Thanks for reading!