Remote Mailbox
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.
The standard port number to establish a remote mailbox connection. Defaults to 3001.
The optional serialize failure handler procedure. Must be #f
or an arity-1 procedure.
The procedure used to establish network connections for a remote mailbox. Defaults to tcp-connect
and must be signature-compatible.
Returns the remote mailbox object for the specified NAME, HOST, PORT
, and (remote-mailbox-connect-procedure)
.
Is the OBJECT a valid remote mailbox?
Returns the remote mailbox name.
Returns the remote mailbox host.
Returns the remote mailbox port.
Is the remote mailbox connected? (Has this remote mailbox been used?)
Invalidate and forget the remote mailbox.
Transmit the OBJECT to the remote mailbox, using the (remote-mailbox-serializer)
.
Invalidate and forget all the remote mailboxs. Performs a reset to the initial state.
The optional deserialize failure handler procedure. Must be #f
or an arity-2 procedure.
The procedure used to establish network connections for a remote mailbox. Defaults to tcp-listen
and must be signature-compatible.
Returns the local mailbox (a mailbox object as returned by the procedure 'make-mailbox') for NAME. Should the mailbox not exist it will be created when the CREATE? flag is #t
. Otherwise returns #f
for a non-existent mailbox.
Forget the local mailbox.
Uses make-tcp-server to create a server procedure on ((remote-mailbox-listen-procedure) PORT)
. The server threads spawned by this procedure are continuously processing remote mailbox sends until the connection is closed.
A remote send will automatically create the requested local mailbox.
Use (mailbox-receive! (get-local-mailbox NAME) ...)
to get remote messages.
Returns the remote mailbox server thread. Should the server thread not exist it will be created with the specified ((remote-mailbox-listen-procedure) PORT)
and started.
Returns the listener object for the specified SERVER-THREAD, as created by run-remote-mailbox-server
.
The sender (client) identity is not part of this API.
The use of port 3001 (in the reserved range) is problematic.
Copyright (c) 2006, Kon Lovett. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.