The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: too many msgs (unknown source)
cldnails
Newbie
Rank: 1



UID 91
Digest Posts 0
Credits 0
Posts 44
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 2, 2007 01:53 AM  Profile | P.M. 
too many msgs (unknown source)



too many msgs (unknown source)



hi all,

i have a problem that i don't know its source. i got a client - server application (one client only) over tcp. i use berkley socket architecture (i.e. select). i log every msg id that each side recv/ send. the problem is that each side accept more msgs that i actually send, so that all the data that i send is recieved by both sides but between the 'correct' msgs each side accept 'empty msgs'. i indexed each msgs ids starting from 100 and on, and the log file do contain all of them but also empty msgs (id = 0). the log file looks like that:


100
0
101
0
0
102
0

etc.

do anyone knows what could be the reason? i checked the buffer state over the 'wrong msgs' and noticed all cells in buffer contains only '0'. also found out that on these cases bytescounter equals msg_len, so it looks like some wiered msg is somehow received.

i also checked the send function and noticed it's never being called with any msg whos id is less than 100 (so it can't explain the id '0').

in my encode string function (client and server are multi os so i encode/ decode string) i put '\0' in the end of array. could that be the reason?

any other ideas?


Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:39 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.004617 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP