source: project/release/3/remote-mailbox/tags/1.1/remote-mailbox.html @ 11637

Last change on this file since 11637 was 11637, checked in by Kon Lovett, 12 years ago

Cosmetic changes

File size: 10.5 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<!-- Generated by eggdoc Revision: 1.20  -->
3<html>
4<head>
5<title>Eggs Unlimited - remote-mailbox</title><style type="text/css"> <!--
6      CODE {
7            color: #666666;
8          }
9/*   DT.definition EM { font-weight: bold; font-style: normal; } */
10
11     DT.definition { 
12                   background: #eee;
13                   color: black;
14                   padding: 0.2em 1em 0.2em 0.7em;
15                   margin-left: 0.2em;
16border: 1px solid #bbc;
17                   font-family: "Andale Mono", monospace;
18                   /* font-size: 1.2em; */
19                   
20                 }
21     DD {
22                   margin-top: 0.8em;
23                   margin-bottom: 0.8em;
24     }
25     DIV.subsection {
26                    border-top: 1px solid #448;
27                    padding-left: 1em;
28                    margin-bottom: 1.2em;
29     }
30     DIV.subsubsection {
31                    border-top: 1px dotted #99c;
32                    /* border-left: 1px solid #99c; */
33                    padding-left: 1em;
34                    margin-bottom: 1.2em;
35     }
36     DIV.subsubsubsection {
37                    border-top: 1px solid #ddf;
38                    padding-left: 1em;
39                    margin-bottom: 1.2em;
40     }
41
42         DIV.section {
43                 margin-bottom: 1.5em;
44         }
45         a:link {
46                 color: #336;
47         }
48         a:visited { color: #666; }
49         a:active  { color: #966; }
50         a:hover   { color: #669; }
51         body { margin: 0; padding: 0; background: #fff; color: #000; font: 9pt "Lucida Grande", "Verdana", sans-serif; }
52         H2 {
53                 background: #336;
54                 color: #fff;
55                 padding-top: 0.5em;
56                 padding-bottom: 0.5em;
57                 padding-left: 16px;
58                 margin: 0 0 1em 0;
59        }
60        UL LI {
61                list-style: none;
62        }
63        TT {
64                font-family: "Andale Mono", monospace;
65                /* font-size: 1.2em; */
66        }
67        H3 {
68                color: #113;
69                margin-bottom: 0.5em;
70        }
71        H4, H5, H6 {
72                color: #113;
73                margin-bottom: 1.0em;
74        }
75        H5 {
76                font-weight: normal;
77                font-style: italic;
78                font-size: 100%;
79                margin-top: 1.2em;
80        }
81        H6 {
82                font-weight: bold;
83                font-size: 85%;
84                margin-top: 1.2em;
85        }
86     DIV#eggheader {
87         text-align: center;
88                 float: right;
89                 margin-right: 2em;
90     }
91     DIV#header IMG {
92            /* display: block; margin-left: auto; margin-right: auto;  */
93            /* float: right; */
94            border: none;  /* firefox */
95     }
96     DIV#footer {
97                background: #bbd;
98                padding: 0.7em ;
99                border-top: 1px solid #cce;
100     }
101     DIV#footer hr {
102                display: none;
103     }
104     DIV#footer a {
105                float: left;
106     }
107     DIV#revision-history {
108         float: right;
109     }
110     
111     DIV#body {
112                 margin: 1em 1em 1em 16px;
113         }
114
115     DIV#examples PRE {
116       background: #eef;
117       padding: 0.1em;
118       border: 1px solid #aac;
119     }
120     PRE#license, DIV#examples PRE {
121       padding: 0.5em;
122     }
123     DIV#examples PRE {
124       /* font-size: 85%; */
125     }
126     PRE { font-family: "Andale Mono", monospace; }
127     TABLE {
128       background: #eef;
129       padding: 0.2em;
130       border: 1px solid #aac;
131       border-collapse: collapse;
132       width: 100%;
133     }
134     TABLE.symbol-table TD.symbol {
135          width: 15em;
136          font-family: "Andale Mono", monospace;
137          /* font-size: 1.2em; */
138     }
139     TH {
140       text-align: left;
141       border-bottom: 1px solid #aac;
142       padding: 0.25em 0.5em 0.25em 0.5em;
143     } 
144     TD { padding: 0.25em 0.5em 0.25em 0.5em; }
145     --></style></head>
146<body>
147<div id="header">
148<h2>remote-mailbox</h2>
149<div id="eggheader"><a href="index.html">
150<img src="egg.jpg" alt="[Picture of an egg]" /></a></div></div>
151<div id="body">
152<div class="section">
153<h3>Description</h3>
154<p>Remote Mailbox</p></div>
155<div class="section">
156<h3>Author</h3><a href="mailto:klovett@pacbell.net">Kon Lovett</a></div>
157<div class="section">
158<h3>Requires</h3>
159<ul>
160<li>tcp-server</li>
161<li>s11n</li>
162<li>mailbox</li>
163<li>miscmacros</li>
164<li>synch</li>
165<li>misc-extn</li>
166<li>lookup-table</li></ul></div>
167<div class="section">
168<h3>Usage</h3><tt>(require-extension remote-mailbox)</tt></div>
169<div class="section">
170<h3>Download</h3><a href="remote-mailbox.egg">remote-mailbox.egg</a></div>
171<div class="section">
172<h3>Documentation</h3>
173<p>Purports to provide an API for sending and receiving remote messages. This egg attempts to duplicate the mailbox egg send semantics across an IP connection.</p>
174<div class="subsection">
175<h4>Common Parameters</h4>
176<dt class="definition"><strong>parameter:</strong> default-remote-mailbox-port</dt>
177<dd>
178<p>The standard port number to establish a remote mailbox connection. Defaults to 3001.</p></dd></div>
179<div class="subsection">
180<h4>Client Parameters</h4>
181<dt class="definition"><strong>parameter:</strong> remote-mailbox-serializer</dt>
182<dd>
183<p>The optional serialize failure handler procedure. Must be <code>#f</code> or an arity-1 procedure.</p></dd>
184<dt class="definition"><strong>parameter:</strong> remote-mailbox-connect-procedure</dt>
185<dd>
186<p>The procedure used to establish network connections for a remote mailbox. Defaults to <code>tcp-connect</code> and must be signature-compatible.</p></dd></div>
187<div class="subsection">
188<h4>Client Procedures</h4>
189<dt class="definition"><strong>procedure:</strong> (get-remote-mailbox NAME [HOST &quot;localhost&quot;] [PORT (default-remote-mailbox-port)])</dt>
190<dd>
191<p>Returns the remote mailbox object for the specified <tt>NAME</tt>, <tt>HOST</tt>, <code>PORT</code>, and <code>(remote-mailbox-connect-procedure)</code>.</p></dd>
192<dt class="definition"><strong>procedure:</strong> (remote-mailbox? OBJECT)</dt>
193<dd>
194<p>Is the <tt>OBJECT</tt> a valid remote mailbox?</p></dd>
195<dt class="definition"><strong>procedure:</strong> (remote-mailbox-name RCH)</dt>
196<dd>
197<p>Returns the remote mailbox name.</p></dd>
198<dt class="definition"><strong>procedure:</strong> (remote-mailbox-host RCH)</dt>
199<dd>
200<p>Returns the remote mailbox host.</p></dd>
201<dt class="definition"><strong>procedure:</strong> (remote-mailbox-port RCH)</dt>
202<dd>
203<p>Returns the remote mailbox port.</p></dd>
204<dt class="definition"><strong>procedure:</strong> (remote-mailbox-connected? RCH)</dt>
205<dd>
206<p>Is the remote mailbox connected? (Has this remote mailbox been used?)</p></dd>
207<dt class="definition"><strong>procedure:</strong> (drop-remote-mailbox! RCH)</dt>
208<dd>
209<p>Invalidate and forget the remote mailbox.</p></dd>
210<dt class="definition"><strong>procedure:</strong> (remote-mailbox-send! RCH OBJECT)</dt>
211<dd>
212<p>Transmit the <tt>OBJECT</tt> to the remote mailbox, using the <code>(remote-mailbox-serializer)</code>.</p></dd>
213<dt class="definition"><strong>procedure:</strong> (drop-all-remote-mailboxs!)</dt>
214<dd>
215<p>Invalidate and forget all the remote mailboxs. Performs a reset to the initial state.</p></dd></div>
216<div class="subsection">
217<h4>Server Parameters</h4>
218<dt class="definition"><strong>parameter:</strong> remote-mailbox-deserializer</dt>
219<dd>
220<p>The optional deserialize failure handler procedure. Must be <code>#f</code> or an arity-2 procedure.</p></dd>
221<dt class="definition"><strong>parameter:</strong> remote-mailbox-listen-procedure</dt>
222<dd>
223<p>The procedure used to establish network connections for a remote mailbox. Defaults to <code>tcp-listen</code> and must be signature-compatible.</p></dd></div>
224<div class="subsection">
225<h4>Server Procedures</h4>
226<dt class="definition"><strong>procedure:</strong> (get-local-mailbox NAME [CREATE? #t])</dt>
227<dd>
228<p>Returns the local mailbox (a mailbox object as returned by the procedure 'make-mailbox') for <tt>NAME</tt>. Should the mailbox not exist it will be created when the <tt>CREATE?</tt> flag is <code>#t</code>. Otherwise returns <code>#f</code> for a non-existent mailbox.</p></dd>
229<dt class="definition"><strong>procedure:</strong> (drop-local-mailbox! NAME)</dt>
230<dd>
231<p>Forget the local mailbox.</p></dd>
232<dt class="definition"><strong>procedure:</strong> (make-remote-mailbox-server [PORT (default-remote-mailbox-port)])</dt>
233<dd>
234<p>Uses make-tcp-server to create a server procedure on <code>((remote-mailbox-listen-procedure) PORT)</code>. The server threads spawned by this procedure are continuously processing remote mailbox sends until the connection is closed.</p>
235<p>A remote send will automatically create the requested local mailbox.</p>
236<p>Use <code>(mailbox-receive! (get-local-mailbox NAME) ...)</code> to get remote messages.</p></dd>
237<dt class="definition"><strong>procedure:</strong> (run-remote-mailbox-server [PORT (default-remote-mailbox-port)])</dt>
238<dd>
239<p>Returns the remote mailbox server thread. Should the server thread not exist it will be created with the specified <code>((remote-mailbox-listen-procedure) PORT)</code> and started.</p></dd>
240<dt class="definition"><strong>procedure:</strong> (remote-mailbox-server-listener SERVER-THREAD)</dt>
241<dd>
242<p>Returns the listener object for the specified <tt>SERVER-THREAD</tt>, as created by <code>run-remote-mailbox-server</code>.</p></dd></div></div>
243<div class="section">
244<h3>Issues</h3>
245<p>The sender (client) identity is not part of this API.</p>
246<p>The use of port 3001 (in the reserved range) is problematic.</p></div>
247<div class="section">
248<h3>Version</h3>
249<ul>
250<li>1.0 </li>
251<li>0.4 Added lookup-table rqrmnt</li>
252<li>0.3 Incompatible API changes, see get-local-mailbox, make-remote-mailbox-server, run-remote-mailbox-server</li>
253<li>0.2 Needs misc-extn &gt; 2.0</li>
254<li>0.1 Initial release</li></ul></div>
255<div class="section">
256<h3>License</h3>
257<pre>Copyright (c) 2006, Kon Lovett.  All rights reserved.
258
259Permission is hereby granted, free of charge, to any person obtaining a
260copy of this software and associated documentation files (the Software),
261to deal in the Software without restriction, including without limitation
262the rights to use, copy, modify, merge, publish, distribute, sublicense,
263and/or sell copies of the Software, and to permit persons to whom the
264Software is furnished to do so, subject to the following conditions:
265
266The above copyright notice and this permission notice shall be included
267in all copies or substantial portions of the Software.
268
269THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
270IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
271FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
272THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
273OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
274ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
275OTHER DEALINGS IN THE SOFTWARE.</pre></div></div>
276<div id="footer">
277<hr /><a href="index.html">&lt; Egg index</a>
278<div id="revision-history">$Revision$ $Date$</div>&nbsp;</div></body></html>
Note: See TracBrowser for help on using the repository browser.