James Hancock
asked on
python UDP how do I specify an IP destination?
Hi,
In my UDP, python, server client system, an RTS, how does my client specify the IP address location of the server? - with a HELO type message in a byte array
What does the client send region look like? and the server receive loop?
Do game servers first have a client-join loop and THEN a gameplay loop, or one loop for everything?
Thanks
In my UDP, python, server client system, an RTS, how does my client specify the IP address location of the server? - with a HELO type message in a byte array
What does the client send region look like? and the server receive loop?
Do game servers first have a client-join loop and THEN a gameplay loop, or one loop for everything?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think that is good. I have datagrams sending and receiving.
But, on the receiver end, how do I pick apart the data?
In
data, addr = s.recvfrom(1024)
is data the exact byte array I send from the client? How do I parse the individual bytes?
I usually have data[0] byte as the message type code
and the subsequent bytes, the relevant data for the message.
?