I think I've tracked down the problem with my LJSync client. It's the opposite as I thought before. It looks to me like the server is returning to few entries, so my client gets confused and then tries to download the whole thing all over again. On my test of the "test" account it was expecting 818 but only got 812 so it started over, and thus got more then 818 and crashed.
So I've isolated the problem I'll try and work on a solution tonight. Thanks for all the testing.
I'm pretty new to UNIX socket programming, so bear with me.
This has been bothering me for a long time, and I can't seem to find an easy answer. Say I'm writing a LJ client in C, and I want to log in to LJ. So I make the connection, write the data to the write socket, and then close it. Then I receive data from the read socket, of course. But say I'm working with something like moodids and there's going to be a lot of data returned on the read socket (and not necessarily all in one burst), how do I know when to stop reading from the socket? I can't very well use recv and check if the size is less than 0, because LJ may not have transmitted everything in one send. Is there some way to check whether or not LJ has closed the write end of the socket (i.e. the read part of my socket)? Using poll or something?