extra data received with gameslist from lobby

For code related discussions and questions
Post Reply
User avatar
Terminator
Regular
Regular
Posts: 1064
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

extra data received with gameslist from lobby

Post by Terminator » 29 Nov 2013, 03:15

recently I've made my java "project" to receive a gameslist from lobby, but I have one question.
There are extra 8 bytes that comes before ending massage.

I've tried read them like integers, but had no sense. Or I've just missed something ? :ninja:

Code: Select all

...
3.1.1 RC3
*bytesleft =264*
200
123
Welcome to the lobby server!  3.1.1 RC 3 is released!  Get it now!
Last hosted game was  0 hours,  0 mins, and  0 secs ago.
parsed as 2 integers.

After version I skeep 255 + 36 (unused stuff) bytes. :?:
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100

User avatar
vexed
Inactive
Inactive
Posts: 2471
Joined: 27 Jul 2010, 02:07

Re: extra data received with gameslist from lobby

Post by vexed » 29 Nov 2013, 03:54

I would need to see the code, but, have you looked at NETrecvGAMESTRUCT() ?
That is the buffer size we need...
/facepalm ...Grinch stole Warzone๐Ÿ™ˆ๐Ÿ™‰๐Ÿ™Š contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.

User avatar
Terminator
Regular
Regular
Posts: 1064
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: extra data received with gameslist from lobby

Post by Terminator » 29 Nov 2013, 10:11

Yes I've seen those functions but there same as in wiki page that I was takeing info
Attachments
lobby.txt
ugly, just testing unit
(3.5 KiB) Downloaded 138 times
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100

User avatar
vexed
Inactive
Inactive
Posts: 2471
Joined: 27 Jul 2010, 02:07

Re: extra data received with gameslist from lobby

Post by vexed » 30 Nov 2013, 05:05

That is the lobby status code & MOTD length (message of the day) ... look at readLobbyResponse()

Code: Select all

lobbyStatusCode = ntohl(buffer[0]);
MOTDLength = ntohl(buffer[1]);
/facepalm ...Grinch stole Warzone๐Ÿ™ˆ๐Ÿ™‰๐Ÿ™Š contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.

User avatar
Terminator
Regular
Regular
Posts: 1064
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: extra data received with gameslist from lobby

Post by Terminator » 30 Nov 2013, 11:34

Oh, I was right that are integers. Thanks for help.
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100

Post Reply