More documentation.
5 // Created by Jens Alfke on 5/24/08.
6 // Copyright 2008 Jens Alfke. All rights reserved.
8 // This file just contains the Doxygen comments that generate the main (index.html) page content.
11 /*! \mainpage MYNetwork: Mooseyard Networking library, including BLIP protocol implementation.
13 \section intro_sec Introduction
15 MYNetwork is a set of Objective-C networking classes for Cocoa applications on Mac OS X.
18 <li>Networking utility classes (presently only IPAddress);
19 <li>A generic TCP client/server implementation,
20 useful for implementing your own network protocols; (see TCPListener and TCPConnection)
21 <li>An implementation of BLIP, a lightweight network protocol I've invented as an easy way
22 to send request and response messages between peers. (see BLIPListener, BLIPConnection, BLIPRequest, etc.)
25 MYNetwork is released under a BSD license, which means you can freely use it in open-source
26 or commercial projects, provided you give credit in your documentation or About box.
28 \section blipdesc What's BLIP?
30 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.
32 BLIP was inspired by <a
33 href="http://beepcore.org">BEEP</a> (in fact BLIP stands for "BEEP-LIke Protocol") but is
34 deliberately simpler and somewhat more limited. That translates to a smaller and cleaner implemenation, especially since it takes advantage of Cocoa's and CFNetwork's existing support for network streams, SSL and Bonjour.
36 \subsection blipfeatures BLIP Features:
39 <li>Each message is very much like a MIME body, as in email or HTTP: it consists of a
40 blob of data of arbitrary length, plus a set of key/value pairs called "properties". The
41 properties are mostly ignored by BLIP itself, but clients can use them for metadata about the
42 body, and for delivery information (i.e. something like BEEP's "profiles".)
44 <li>Either peer can send a request at any time; there's no notion of "client" and "server" roles.
46 <li> Multiple messages can be transmitted simultaneously in the same direction over the same connection, so a very long
47 message does not block any other messages from being delivered. This means that message ordering
48 is a bit looser than in BEEP or HTTP 1.1: the receiver will see the beginnings of messages in the
49 same order in which the sender posted them, but they might not <i>end</i> in that same order. (For
50 example, a long message will take longer to be delivered, so it may finish after messages that
53 <li>The sender can indicate whether or not a message needs to be replied to; the response is tagged with the
54 identity of the original message, to make it easy for the sender to recognize. This makes it
55 straighforward to implement RPC-style (or REST-style) interactions. (Responses
56 cannot be replied to again, however.)
58 <li>A message can be flagged as "urgent". Urgent messages are pushed ahead in the outgoing queue and
59 get a higher fraction of the available bandwidth.
61 <li>A message can be flagged as "compressed". This runs its body through the gzip algorithm, ideally
62 making it faster to transmit. (Common markup-based data formats like XML and JSON compress
63 extremely well, at ratios up to 10::1.) The message is decompressed on the receiving end,
64 invisibly to client code.
66 <li>The implementation supports SSL connections (with optional client-side certificates), and Bonjour service advertising.
69 \section config Configuration
71 MYNetwork requires Mac OS X 10.5 or later, since it uses Objective-C 2 features like
72 properties and for...in loops.
74 MYNetwork uses my <a href="/hg/hgwebdir.cgi/MYUtilities">MYUtilities</a> library. You'll need to have downloaded that library, and added
75 the necessary source files and headers to your project. See the MYNetwork Xcode project,
76 which contains the minimal set of MYUtilities files needed to build MYUtilities. (That project
77 has its search paths set up to assume that MYUtilities is in a directory next to MYNetwork.)
79 \section download How To Get It
82 <li><a href="/hg/hgwebdir.cgi/MYNetwork/archive/tip.zip">Download the current source code</a>
83 <li>To check out the source code using <a href="http://selenic.com/mercurial">Mercurial</a>:
84 \verbatim hg clone /hg/hgwebdir.cgi/MYNetwork/ MYNetwork \endverbatim
85 <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
86 a directory next to MYNetwork.
89 Or if you're just looking:
92 <li><a href="/hg/hgwebdir.cgi/MYNetwork/file/tip">Browse the source code</a>
93 <li><a href="annotated.html">Browse the class documentation</a>
96 There isn't any conceptual documentation yet, beyond what's in the API docs, but you can
97 <a href="/hg/hgwebdir.cgi/MYNetwork/file/tip/BLIP/Demo/">look
98 at the sample BLIPEcho client and server</a>, which are based on Apple's
99 <a href="http://developer.apple.com/samplecode/CocoaEcho/index.html">CocoaEcho</a> sample code.