GithubHelp home page GithubHelp logo

acud / go-reuseport-transport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libp2p/go-reuseport-transport

0.0 1.0 0.0 100 KB

A basic transport for automatically (and intelligently) reusing TCP ports

License: MIT License

Go 100.00%

go-reuseport-transport's Introduction

go-reuseport-transport

Discourse posts GoDoc Build Status

Basic reuseport TCP transport

This package provides a basic transport for automatically (and intelligently) reusing TCP ports.

To use, construct a new Transport (the zero value is safe to use) and configure any listeners (tr.Listen(...)).

Then, when dialing (tr.Dial(...)), the transport will attempt to reuse the ports it's currently listening on, choosing the best one depending on the destination address.

NOTE: Currently, we don't make any attempts to prevent two reusport transports from interfering with each other (reusing each other's ports). However, we reserve the right to fix this in the future.

Install

go-reuseport-transport is a standard Go module which can be installed with:

go get github.com/libp2p/go-reuseport-transport

This repo is gomod-compatible, and users of go 1.11 and later with modules enabled will automatically pull the latest tagged release by referencing this package. Upgrades to future releases can be managed using go get, or by editing your go.mod file as described by the gomod documentation.

Current use in libp2p

This package is currently used by the go-tcp-transport libp2p transport and will likely be used by more libp2p transports in the future.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the libp2p Code of Conduct.

Want to hack on libp2p?

License

MIT


The last gx published version of this module was: 0.2.3: QmTmbamDjDWgHe8qeMt7ZpaeNpTj349JpFKuwTF321XavT

go-reuseport-transport's People

Contributors

stebalien avatar anacrolix avatar dependabot-preview[bot] avatar hsanjuan avatar kubuxu avatar yusefnapora avatar raulk avatar avbasov avatar willscott 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.