SIPp will read a message until it finds a "\r\n\r\n", at which point it 
knows that it received the headers.  Next it finds the Content-Length 
header in the message, and if it exists reads the number of bytes 
specified in the content length header.  A message is not complete until 
the full number of bytes have been read from the socket.  A message can 
not be a partial message, unless an error occurred on the socket.

What I did is insert a bit of buffering, so that SIPp will suck up the 
available bytes in the TCP buffer into a local buffer in one system call. 
The next time SIPp needs to read one or more bytes, it looks in the local 
buffer first; avoiding the system call.  This does not change any of the 
logic for determining if something is partial or complete.

Charles

Katty Xiong <[EMAIL PROTECTED]> wrote on 01/09/2007 03:49:55 PM:

> 
> Hi Charles,
> 
> I see you have made a lot of changes to TCP handling
> in SIPp. Could you explain how SIPp decides if a SIP
> message is complete or partial? Since I suspect the
> problem I am seeing could be caused by SIP message
> compatibility issue between SER and SIPp. 
> 
> thanks,
> Joy
> 
> --- Charles P Wright <[EMAIL PROTECTED]> wrote:
> 
> > What release of SIPp are you using?  The latest
> > (1.1-rc8) has lots of TCP 
> > fixes, which should hopefully solve your problems.
> > 
> > Charles
> > 
> > [EMAIL PROTECTED] wrote on
> > 01/09/2007 01:26:53 PM:
> > 
> > > Hi,
> > > 
> > > I am using SIPp and SER for some performance study
> > and
> > > get several errors when using TCP protocol. From
> > the
> > > packet trace, I notice when TCP publicize zero
> > window
> > > at SIPp or SER side, SIP message will get
> > truncated or
> > > several partial or whole SIP message get combined
> > in
> > > one TCP packet, which leads to error. I haven?t
> > > checked the code yet, but if somebody already
> > knows
> > > this off the head, please clarify me of the
> > following
> > > questions.
> > > 1)   When SIPp receives a truncated SIP message,
> > how
> > > does it handle the partial message? 
> > > 2)   When SIPp receives a packet that has one
> > partial
> > > SIP message combined with another partial SIP
> > message,
> > > how does it handle the packet?
> > > 
> > > I joined the alias recently, so if the alias
> > already
> > > had discussions on TCP stream behavior and its
> > effects
> > > on SIP implementation, could somebody point the
> > link
> > > to me?
> > > 
> > > Thanks,
> > > Joy
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > > http://mail.yahoo.com 
> > > 
> > > 
> >
> 
-------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of
> > IT
> > > Join SourceForge.net's Techsay panel and you'll
> > get the chance to share 
> > your
> > > opinions on IT & business topics through brief
> > surveys - and earn cash
> > > 
> >
> 
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Sipp-users mailing list
> > > Sipp-users@lists.sourceforge.net
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/sipp-users
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to