Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - ian-kent/linkio: Simulate network link speed

Simulate network link speed. Contribute to ian-kent/linkio development by creating an account on GitHub.

Visit SiteGitHub - ian-kent/linkio: Simulate network link speed

GitHub - ian-kent/linkio: Simulate network link speed

Simulate network link speed. Contribute to ian-kent/linkio development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

linkio GoDoc Build Status

linkio provides an io.Reader and io.Writer that simulate a network connection of a certain speed, e.g. to simulate a mobile connection.

Quick start

You can use linkio to wrap existing io.Reader and io.Writer interfaces:

// Create a new link at 512kbps
link = linkio.NewLink(512 * linkio.KilobitPerSecond)

// Open a connection
conn, err := net.Dial("tcp", "google.com:80")
if err != nil {
  // handle error
}

// Create a link reader/writer
linkReader := link.NewLinkReader(io.Reader(conn))
linkWriter := link.NewLinkWriter(io.Writer(conn))

// Use them as you would normally...
fmt.Fprintf(linkWriter, "GET / HTTP/1.0\r\n\r\n")
status, err := bufio.NewReader(linkReader).ReadString('\n')

History and license

This repository is a fork of Jeff R. Allen's linkio. linkio was brought into the world to help make a proxy to simulate slow Internet links (see this blog posting).

Jeff's linkio was licensed via the BSD 3-clause license.

Any modifications since the initial commit are Copyright ยฉโ€Ž 2014, Ian Kent (http://iankent.uk), and are released under the terms of the MIT License.

GoLang Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.