Is it possible to change a Socket ID or chance how GameMaker generate Socket ID?

jackrucel

Member
Hi every one, I would like to know if is possible to change the Socket ID or change how GameMaker generate Socket ID for a server conection.

I have a network_create_server() and a network_connect( ) on a separated project,a Server and a Client, every time
a client connect to the server, the server generate a ID for the Connection/Socket, the first connection get the id 1,the second 2,the third 3 and so on, but if connection 1 for example is terminated and another connection is made, this new connection will get the ID 1,I would like that the connection ID would keep counting, or if I could change the ID, for example:

GML:
switch(ievent_tipo) {

    case network_type_connect:

        async_load[? "socket"] = index_sokets         

        index_sokets += 1         

        var isoket = async_load[? "socket"];

        soket[isoket] = isoket

        break; }
Is it possible to change how the Socket ID are generated or generate my self ?

Thank you guys very much.
 

chamaeleon

Member
No, you can't do it. Just use the data as given to you and treat the id as a black box that you don't look inside and don't know the value of (but since it's just a number you could of course look at it), and compare it as required to previously stored black boxes in data structures you maintain as necessary in conjunction with the various async network event types.
 
Top