The online racing simulator
InSim help - obtaining player list
Hi, I'm trying to make a small single-player app in VB.NET using InSim.

My problem is that when I request a player list with TINY_NPL, I cannot get a list of more that 6 players.
The max packet size InSim returns is 512 bytes, so the list is incomplete. The buffer size I use is big enough, the problem is not there. How am I supposed to get the full list ?

Oh .. and another thing. When, in the middle of a race, the player goes spectator and then rejoins the race I'm not getting the ISP_PLL and ISP_NPL packets. Is it normal InSim behavior or am I doing something wrong ?

Sorry for the simple questions ... still a learner
I assume that didn't use any library, but wrote code on your own?

I believe problem is in your understanding of TCP.
One recv() call can return more insim packets, so after you have processed first, than second, ... until you got no more complete packet in buffer. Next recv() call should concatenate to end of data in buffer.
While ago I have tested my insim with different buffer sizes, and recv() never returned more than 512 bytes even tho my buffer was much larger.

IS_PLL and IS_NPL are always followed by IS_MSO, so I guess you are reading just first packet that recv() return and ignore rest.?
You are right, I'm trying to write the code from scratch, and I had the wrong idea that I should read one packet at a time.

I'll investigate further and come back if I have any more trouble. Thanks for the help
I think that every single person makes this mistake when they first start TCP programming.
Problem solved. Everything works as intended now. Thanks for the 'resposnse' again

FGED GREDG RDFGDR GSFDG