• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Force packetise and interesting phenomena with two listening sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Force packetise and interesting phenomena with two listening sockets


  • Subject: Re: Force packetise and interesting phenomena with two listening sockets
  • From: "Justin C. Walker" <email@hidden>
  • Date: Thu, 16 Oct 2008 11:37:20 -0700


On Oct 16, 2008, at 05:00 , Liwei wrote:

Thanks for the reply!

Ahh, that explains it!

Well, I guess I'm too lazy to devise and write a protocol that allows
me to know clearly when each "packet" of data arrives. I'm writing a
sort of logging application (which is complicated by the fact that
each data entry can be only different length) so I need to know when
each data entry starts and ends, so I thought if each send() or
CFWriteStreamWrite() generates one result (one packet, or if its too
long, over multiple fragments) on the other side, I would only need a
fixed header, footer and checksum to do my stuff.

As Quinn mentioned a couple of days ago on this list, this book:
<http://www.unpbook.com/>
(Unix Network Programming; 1st/2nd edition by Stevens, 3rd by Fenner and Rudoff) is a great resource for those who are trying to develop code that uses "the network" (TCP/IP).


This website and Stevens' website (a link is on the above site) have tarballs of code related to the 3rd and 2nd edition of the book, respectively. Those tarballs have a lot of small examples of working code that may help you.

HTH

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income
--------
"Weaseling out of things is what separates us from the animals.
 Well, except the weasel."
      - Homer J Simpson
--------


_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Force packetise and interesting phenomena with two listening sockets (From: email@hidden (David E. Gelhar))
 >Re: Force packetise and interesting phenomena with two listening sockets (From: Liwei <email@hidden>)

  • Prev by Date: Re: not receiving kCFStreamEventCanAcceptBytes
  • Next by Date: Re: not receiving kCFStreamEventCanAcceptBytes
  • Previous by thread: Re: Force packetise and interesting phenomena with two listening sockets
  • Next by thread: Re: Force packetise and interesting phenomena with two listening sockets
  • Index(es):
    • Date
    • Thread