Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / UDP Messages

Author
Message
Toranaga
6
Years of Service
User Offline
Joined: 4th Jul 2017
Location:
Posted: 22nd Feb 2020 02:30
hi,

how to read a message (byte/string/whatever) from the udplistener?
i use msgID = GetUDPNetworkMessage(x) and get an ID but how to read the real message?
THX
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 22nd Feb 2020 23:51
The same way you do with the original TCP message system:

•GetNetworkMessageFloat
•GetNetworkMessageInteger
•GetNetworkMessageString

Think of the UDP listener as just another network instance and handle them independently, but manage retrieving their message data the same way. One restriction to currently be aware of is that the CopyNetworkMessage command doesn't yet fully work with UDP messages, only TCP. If you need to copy an entire received UDP message for rebroadcasting or storage (such as for a server-client setup), you'll either need to rebuild it entirely for each client to send to or get every line of data from the message first, then perform the copy operation after. As far as I know though, this has been fixed for the next update so this is only a temporary issue.
Toranaga
6
Years of Service
User Offline
Joined: 4th Jul 2017
Location:
Posted: 23rd Feb 2020 20:55
thx a lot

Login to post a reply

Server time is: 2024-04-24 01:42:43
Your offset time is: 2024-04-24 01:42:43