1.1 --- a/maindocs.h Thu May 29 16:40:36 2008 -0700
1.2 +++ b/maindocs.h Thu Jul 02 20:45:11 2009 -0700
1.3 @@ -12,117 +12,10 @@
1.4
1.5 <center><b>By <a href="/Jens/">Jens Alfke</a></b></center>
1.6
1.7 - <img src="BLIP.png">
1.8 -
1.9 -\section intro_sec Introduction
1.10 + <img src="../../BLIP/logo.png">
1.11
1.12 - MYNetwork is a set of Objective-C networking classes for Cocoa applications on Mac OS X.
1.13 - It consists of:
1.14 - <ul>
1.15 - <li>Networking utility classes (presently only IPAddress);
1.16 - <li>A generic TCP client/server implementation,
1.17 - useful for implementing your own network protocols; (see TCPListener and TCPConnection)
1.18 - <li>An implementation of <a href="#blipdesc">BLIP</a>, a lightweight network protocol I've invented as an easy way
1.19 - to send request and response messages between peers. (see BLIPListener, BLIPConnection, BLIPRequest, etc.)
1.20 - </ul>
1.21 + <center><a href="annotated.html">Class documentation</a></center>
1.22
1.23 -\section license License and Disclaimer
1.24 -
1.25 - MYNetwork is released under a BSD license, which means you can freely use it in open-source
1.26 - or commercial projects, provided you give credit in your documentation or About box.
1.27 -
1.28 - As I write this (May 2008), MYNetwork is still very much under development. I am using it as the foundation of my own commercial products, at least one of which is currently at about the alpha stage. I'm making changes to this code as I see fit, fairly often.
1.29 -
1.30 -That's good, in that the code is getting real-world use. But it also means that APIs and functionality are subject to change. (Of course, the entire revision tree is always available, so you're free to stick with any revision you like, and even "cherry-pick" desired changes from future ones.)
1.31 -
1.32 -Not all of this code gets thoroughly exercised by my test cases or my applications, so some things may not work. Obviously, this code comes with no warranty nor any guarantee of tech support, though I will try to do my best to help out. Hopefully the source code is clear enough to let you figure out what's going on.
1.33 -
1.34 -If you come across bugs, please tell me about them. If you fix them, I would love to get your fixes and incorporate them. If you add features I would love to know about them, and I will incorporate them if I think they make sense for the project. Thanks!
1.35 -
1.36 -\section blipdesc What's BLIP?
1.37 -
1.38 - <table style="background-color: #fff; padding: 5px; float: right" cellspacing=0>
1.39 - <tr><td>
1.40 - <img src="http://groups.google.com/groups/img/3nb/groups_bar.gif"
1.41 - height=26 width=132 alt="Google Groups">
1.42 - </td></tr>
1.43 - <tr><td style="padding-left: 5px;font-size: 125%">
1.44 - <b>BLIP Protocol</b>
1.45 - </td></tr>
1.46 - <tr><td style="padding-left: 5px">
1.47 - <a href="http://groups.google.com/group/blip-protocol">Visit this group</a>
1.48 - </td></tr>
1.49 - </table>
1.50 -
1.51 -BLIP is a message-oriented network protocol that lets the two peers on either end of a TCP socket send request and response messages to each other. It's a generic protocol, in that the requests and responses can contain any kind of data you like.
1.52 -
1.53 -BLIP was inspired by <a
1.54 -href="http://beepcore.org">BEEP</a> (in fact BLIP stands for "BEEP-LIke Protocol") but is
1.55 -deliberately simpler and somewhat more limited. That results in a smaller and cleaner implementation, especially since it takes advantage of Cocoa's and CFNetwork's existing support for network streams, SSL and Bonjour. (BLIP is currently a bit under 2,000 lines of code, and the rest of the MYNetwork classes it builds on add up to another 1,500. That's at least an order of magnitude smaller than existing native-code BEEP libraries.)
1.56 -
1.57 -\subsection blipfeatures BLIP Features:
1.58 -
1.59 - <ul>
1.60 - <li>Each message is very much like a MIME body, as in email or HTTP: it consists of a
1.61 -blob of data of arbitrary length, plus a set of key/value pairs called "properties". The
1.62 -properties are mostly ignored by BLIP itself, but clients can use them for metadata about the
1.63 -body, and for delivery information (i.e. something like BEEP's "profiles".)
1.64 -
1.65 -<li>Either peer can send a request at any time; there's no notion of "client" and "server" roles.
1.66 -
1.67 -<li> Multiple messages can be transmitted simultaneously in the same direction over the same connection, so a very long
1.68 -message does not block any other messages from being delivered. This means that message ordering
1.69 -is a bit looser than in BEEP or HTTP 1.1: the receiver will see the beginnings of messages in the
1.70 -same order in which the sender posted them, but they might not <i>end</i> in that same order. (For
1.71 -example, a long message will take longer to be delivered, so it may finish after messages that
1.72 -were begun after it.)
1.73 -
1.74 -<li>The sender can indicate whether or not a message needs to be replied to; the response is tagged with the
1.75 -identity of the original message, to make it easy for the sender to recognize. This makes it
1.76 -straighforward to implement RPC-style (or REST-style) interactions. (Responses
1.77 -cannot be replied to again, however.)
1.78 -
1.79 -<li>A message can be flagged as "urgent". Urgent messages are pushed ahead in the outgoing queue and
1.80 -get a higher fraction of the available bandwidth.
1.81 -
1.82 -<li>A message can be flagged as "compressed". This runs its body through the gzip algorithm, ideally
1.83 -making it faster to transmit. (Common markup-based data formats like XML and JSON compress
1.84 -extremely well, at ratios up to 10::1.) The message is decompressed on the receiving end,
1.85 -invisibly to client code.
1.86 -
1.87 -<li>The implementation supports SSL connections (with optional client-side certificates), and Bonjour service advertising.
1.88 -</ul>
1.89 -
1.90 -\section config Configuration
1.91 -
1.92 - MYNetwork requires Mac OS X 10.5 or later, since it uses Objective-C 2 features like
1.93 - properties and for...in loops.
1.94 -
1.95 - MYNetwork uses my <a href="/hg/hgwebdir.cgi/MYUtilities">MYUtilities</a> library. You'll need to have downloaded that library, and added
1.96 - the necessary source files and headers to your project. See the MYNetwork Xcode project,
1.97 - which contains the minimal set of MYUtilities files needed to build MYUtilities. (That project
1.98 - has its search paths set up to assume that MYUtilities is in a directory next to MYNetwork.)
1.99 -
1.100 -\section download How To Get It
1.101 -
1.102 - <ul>
1.103 - <li><a href="/hg/hgwebdir.cgi/MYNetwork/archive/tip.zip">Download the current source code</a>
1.104 - <li>To check out the source code using <a href="http://selenic.com/mercurial">Mercurial</a>:
1.105 - \verbatim hg clone /hg/hgwebdir.cgi/MYNetwork/ MYNetwork \endverbatim
1.106 - <li>As described above, you'll also need to download or check out <a href="/hg/hgwebdir.cgi/MYUtilities">MYUtilities</a> and put it in
1.107 - a directory next to MYNetwork.
1.108 - </ul>
1.109 -
1.110 - Or if you're just looking:
1.111 -
1.112 - <ul>
1.113 - <li><a href="/hg/hgwebdir.cgi/MYNetwork/file/tip">Browse the source code</a>
1.114 - <li><a href="annotated.html">Browse the class documentation</a>
1.115 - </ul>
1.116 -
1.117 - There isn't any conceptual documentation yet, beyond what's in the API docs, but you can
1.118 - <a href="/hg/hgwebdir.cgi/MYNetwork/file/tip/BLIP/Demo/">look
1.119 - at the sample BLIPEcho client and server</a>, which are based on Apple's
1.120 - <a href="http://developer.apple.com/samplecode/CocoaEcho/index.html">CocoaEcho</a> sample code.
1.121 + <center><a href="../../Home">Overview, instructions, conceptual documentation</a></center>
1.122
1.123 */