GithubHelp home page GithubHelp logo

liumorgan / tcpmux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sustrik/tcpmux

0.0 1.0 0.0 192 KB

Implementation of RFC 1078

License: MIT License

Makefile 9.28% Shell 9.32% M4 25.03% C 56.37%

tcpmux's Introduction

TCPMUX

Implementation of TCP multiplexer as defined in RFC 1078.

The mutliplexer is a stand-alone daemon process that distributes the connections accepted on a single TCP port (port 1 by default) to other processes on the same machine.

The package also contains a libmill-compliant client library.

To build it you have to install libmill first. Then:

./autogen.sh
./configure
make check
sudo make install

To start the daemon:

sudo tcpmuxd

The daemon must be run with sudo because it uses port 1 by default, which cannot be opened with standard user privilieges.

If you want to run tcpmuxd without extra privileges, choose a port above 1024:

tcpmuxd 5555

Once the daemon is running, application can listen for incoming tcpmux connections. Here's an example application implementing service "foo". It uses tcpmuxd running on port 5555:

#include <tcpmux.h>

...

tcpmuxsock ls = tcpmuxlisten(5555, "foo", -1);
while(1) {
    tcpsock s = tcpmuxaccept(ls, -1);
    ...
}

Client applications can connect to tcpmux server from anywhere. There's no requirement to run tcpmuxd on the client box:

#include <tcpmux.h>

...

ipaddr addr = ipremote("192.168.0.111", 5555, 0, -1);
tcpsock s = tcpmuxconnect(addr, "foo", -1);

The software is licensed under MIT/X11 license.

tcpmux's People

Contributors

sustrik avatar

Watchers

James Cloos avatar

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.