![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | rico345100 |
Here’s the code for connect localhost server.
export (String) var host = '127.0.0.1'
export (int) var port = 1337
var client: StreamPeerTCP
func _ready():
client = StreamPeerTCP.new()
var error = client.connect_to_host(host, port)
print(error) ---> Always return 0
error always have 0 (OK), regardless server is online or not.
In server, when Godot Game runs and try connect_to_host, connection established both server and godot without any problem.
Is this glitch or something? Using Godot 3.2.rc3.official release.