Hi, i would need some help with custom low-level networking stuff.
I am trying to build a Godot based client for an existing network game Pioneers (a Catan clone). The protocol is a text based TCP protocol (each line is a message). I have no problem connecting the server using netcat, i can type messages and the server responds. But i cannot manage to make it work within Godot. I am instanciating a StreamPeerTCP and call connection.connect_to_host('localhost', 5556), no error is returned but the state of the connection never leaves the "connecting" status. What i am missing?
var connection = StreamPeerTCP.new()
func _ready():
var _error = connection.connect_to_host('127.0.0.1', 5556)
if _error != OK: # This never happens
printerr("Failed to establish connection, ", error)
func _process():
print(connection.get_status()) # This always returns 'connecting'
Thanks for the help in advance.