John, Be aware that sockets are a "stream" based protocol and not a "message" based protocol. When you send data to a socket it may arrive in one or more pieces (packets). On a LAN this may never occur, but over a WAN or the internet your data packets will almost surely be broken up into smaller pieces. On the receiving end you will need to know the length of the data you expect or have some sort of end-of-line character(s) to know when you have received all of the data.
Years ago I wrote a program that worked well on a LAN, but failed randomly when data was passed through the internet. I mistakenly thought that if I sent a packet with 1024 bytes that I would always receive a packet with 1024 bytes (like writing and reading from disk). This is not the case. Kevin M. Sproule Sr. Technical Consultant AFS Technologies, Inc. 2141 E. Highland Ave, Ste. 100 Phoenix, AZ 85016 Care Center: (602) 522-8181 Main: (602) 522-8282 e-mail: [email protected] Our mission is to be the number one supplier of software to the food and beverage industry - -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of doug chanco Sent: Thursday, April 09, 2009 12:56 PM To: [email protected] Subject: [U2] universe sockets I am about to do some socket programming with the universe socket API (universe 10.2.x and aix 5.3.x), are there any gotchas/advice/suggestions anyone would care to share? thanks! dougc ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
