Z
Zodiaq
Guest
i'm trying to read a received tcp packet from custom c# server. i copy the code from an officiel example (NetworkDemo) i'm stuck on this for days now. all that's happening is the server sending a packet containing a message and i'm trying to read it and flash it to the debug console. here is the code script that i called on a Async event of an object after sending a packet to the server:
Code:
/// Read incoming data to the server from a connected saocket
{
// get the buffer the data resides in
var buff2 = ds_map_find_value(async_load, "buffer");
// read ythe command
var cmd = buffer_read(buff2, buffer_u8 );
// Get the socket ID - this is the CLIENT socket ID. We can use this as a "key" for this client
var socks = ds_map_find_value(async_load, "id");
show_debug_message("received : "+cmd+" id : "+socks);
}