classes/class_tcpserver #204
Replies: 1 comment
-
Just had a good conversation with ChatGPT on a sample setup: Not sure what's up with TCPServer's receipt of String data from a client's i.e. if client here is a StreamPeerTCP connected with a status of 2 to a TCPServer, I could see the data over the wire with Wireshark, but TCPServer always saw the raw data as [0, 0]: But when I changed to using a Variant from the client and in the server it worked: I don't think there's a bug, but I could not sus out anything wrong with the initial attempt at using Strings, but Variant is probably better long-term anyways since you can then JSON/YAML it up. It was just weird because String or Variant, over the wire I saw valid packets getting [PSH, ACK] from the server: 0000 02 00 00 00 45 00 00 40 49 1c 40 00 80 06 00 00 ¯_(ツ)_/¯ |
Beta Was this translation helpful? Give feedback.
-
classes/class_tcpserver
Inherits: RefCounted< Object A TCP server. Description: A TCP server. Listens to connections on a port and returns a StreamPeerTCP when it gets an incoming connection. Note: When exporting to Andro...
https://docs.godotengine.org/en/stable/classes/class_tcpserver.html
Beta Was this translation helpful? Give feedback.
All reactions