GMS 2 Asynchronous Networking won't start?

tearzz

Member
So I have an object called obj_connection.
Within that object there's two events. A create event and a asynchronous networking event.

Create:
init_connection();
connect();

Both scripts work, I've used show_debug_message along the way and it has indeed done all it need to do.

Asynchronous Networking:
async_connection();

It never seems to start that script... I've had show_debug_message in the event and the script. I don't get any

connect():
global.socket = network_create_socket(network_socket_tcp);
if global.socket < 0
{
network_destroy(global.socket);
global.socket = -1;
log_message("Failed to create TCP socket");
return(-1);
} else {
log_message("Connecting to socket...");
}
...
...
...
var success = network_connect_raw(global.socket, "irc.chat.twitch.tv", 6667);
if success < 0
{
network_destroy(global.socket);
global.socket = -1;
log_message("Failed to connect");
return(-1)
}
else
{
log_message("Successfully connected");
}

I create the socket and it makes it all the way through with buffers sending login details and so on. But even though the socket successfully connects it doesn't seem to start the Networking event.
 
Top