Git Product home page Git Product logo

child-socket's Introduction

NAME
    Child::Socket - Socket based IPC plugin for Child

DESCRIPTION
    Lets you create a Child object, disconnect from it, and reconnect later
    in the same or different process.

REQUIREMENT NOTE
    Requires UNIX socket support.

SYNOPSIS
        use Child qw/child/;

        # Build with Socket IPC
        my $proc = child {
            my $parent = shift;
            $parent->say("message1");
            my $reply = $parent->read();
        } socket => 1;

        my $message1 = $proc->read();
        $proc->say("reply");

DISCONNECTING AND RECONNECTING
    sript1.pl:

        #!/usr/bin/perl;
        use Child qw/child/;

        $proc = child {
            my $parent = shift;

            # detach will remove the child from the parents process group.
            $parent->detach;

            $parent->disconnect;

            # $parent->connect accepts a client connection
            # argument is timeout in seconds
            $parent->connect(10);

            $parent->say( "Hi" );
        } socket => '/tmp/my-socket';

        $proc->disconnect;

    script2.pl:

        #!/usr/bin/perl;
        use Child qw/proc_connect/;

        my $proc = proc_connect( '/tmp/my-socket' );

        my $msg = $proc->read; # "Hi\n"

AUTHORS
    Chad Granum [email protected]

COPYRIGHT
    Copyright (C) 2010 Chad Granum

    Child-Socket is free software; Standard perl licence.

    Child-Socket is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for
    more details.

child-socket's People

Contributors

exodist avatar

Stargazers

 avatar

Watchers

 avatar  avatar

child-socket's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.