Menu

#24 create_connection() for in-MOO network connections

open-out-of-date
nobody
5
2011-11-11
2004-01-20
Luke-Jr
No

Syntax: create_connection(OBJ to) => obj
create_connection_from(OBJ from, OBJ to) => obj

Establishes a virtual network connection between 'from' (or, if
using the former syntax, #0) and 'to' using a pipe. Returns the
connection object handled on the from/#0 side of the connection.
This can be useful for testing services from within the MOO
without making them available to the outside world.
Testing with bsd-tcp, but should work with any net-multi protocol.

create_connection_from() was created as a seperate bifunc
name (instead of an optional argument) so future expansion
(print-messages, setting from/to strings, for example) is
possible.

Discussion

  • Luke-Jr

    Luke-Jr - 2004-03-02

    create_connection_from patch (version 2)

     
  • Luke-Jr

    Luke-Jr - 2004-03-02

    Logged In: YES
    user_id=25634

    In addition to being (mostly) rewritten to work more
    elegantly (socketpair instead of pipes and no modifications
    to closing of sockets; thanks Ben/Xeric for this idea), this
    new version also retricts the bifuncs to wizards and has an
    option to enable print_messages. (Note it does not use
    DEFAULT_LISTENER_PRINT_MESSAGES, as I made this one against
    a vanilla 1.8.1; A followup patch to support it will be made)

     
  • Luke-Jr

    Luke-Jr - 2004-03-02

    Logged In: YES
    user_id=25634

    create_connection_v2_listening_options.patch can be applied
    on top of the normal v2 patch to use a LIST of options
    instead of print-messages. This patch will only apply with:
    "[ 403534 ] Patch to make name lookup for listening points
    optional" previously applied.

     
  • Luke-Jr

    Luke-Jr - 2004-03-02

    Support for [ 403534 ] Patch to make name lookup for listening points optional

     
  • Luke-Jr

    Luke-Jr - 2011-11-11
    • status: open --> open-out-of-date
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.