Are you using TCP or UDP or another higher level protocol ? If you are using UDP, then packet loss is normal behaviour: UDP is "best effort" protocol. Use either TCP or implement error checking and correction if you need reliability. See "TCP/UDP primer" document available from "support" page at my website.
-- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be ----- Original Message ----- From: "John D Algeo" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Wednesday, April 16, 2008 7:54 PM Subject: [twsocket] Lost packets from an Instrument interfaced via TCP/IP >I am using ICS in a 32 bit replacement of a 16 bit application that >operates a laboratory instrument that uses TCP/IP. It is working well >except for an occaisional failure to catch all of the packets sent after a >data collection. The instrument sends a header packet followed by 49 data >packets. The instrument does not wait for the host computer to acknowledge >each packet. Using Ethereal, I see two packets of 1408 data bytes each >from the instrument followed by an ACK from the host computer, then a >single 1408 byte packet from the instrument and an ACK from the host. This >pattern repeats until all 49 packets have been sent. > > Most of the time, this works. Sometimes, especially if the host is busy, > the host ends up one packet short of the complete message. > > I call Receive() on every OnDataAvailable and store the data in a > preallocated buffer, incrementing the pointer passed to Receive() by the > number of bytes transferred so that no copying is needed after Receive to > assemble the packets. > > There are about 20 - 25 ms between the two packets in a pair. > > Is the server (instrument) behaving acceptably? Is there anything I can > do to better accomodate it? > > Thanks, > John > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be