Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | wombatTurkey | |
Old Version | Published before Godot 3 was released. |
Hey all!
So, I am using put_var
to connect to my tcp server via thePacketPeer
class, but for some odd reason it is sending extra data over the pipe.
For example:
func send(data):
if client.is_connected():
print("Sending: "+str(data))
# Send data
wrapped_client.put_var(str(data))
Will show:
MY TCP server is in nodejs, but, this isn’t a node problem because when I send data from telnet or another tcp application, the extra data isn’t there. It’s coming from godot. Any way around this? Thanks =]
It’s funny/weird because Godot will print this:
Which doesn’t have the extra data… Hmmm
I found the solution:
I was using PacketPeerStream
’s put_var
instead of StreamPeerTCP
’s put_utf8_string
.
Works now
wombatTurkey | 2016-05-28 22:52