• Stars
    star
    53
  • Rank 552,529 (Top 11 %)
  • Language
    Go
  • Created almost 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simulate network link speed

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.

More Repositories

1

gptchat

A GPT-4 client which gives your favourite AI a memory and tools for self-improvement
Go
337
star
2

gofigure

Go configuration made easy!
Go
67
star
3

go-log

A logger, for Go
Go
42
star
4

purl

Perl, but fluffy like a cat!
Go
40
star
5

goose

Server-Sent Events in Go
Go
34
star
6

ikettle2

Hacks for the Smarter iKettle 2.0
Java
18
star
7

MailHog

Inspired by MailCatcher, based on M3MTA
Perl
14
star
8

vagrant-scala-play-mongodb

Vagrant build for Ubuntu with Scala, Play Framework and MongoDB
13
star
9

gopan

Perl dependency management toolchain
Go
12
star
10

envconf

Configure Go applications from the environment
Go
11
star
11

production-ready-go

Code samples from Production Ready Go talk at Golang UK 2017
Go
10
star
12

M3MTA

Experimental Mojolicious IOLoop mail transfer agent with MongoDB backend
Perl
7
star
13

atom-gradient-syntax-theme

Animated gradient syntax highlighting
CSS
5
star
14

cachebot

A Slack bot for CloudFlare
Go
4
star
15

cardiff-go-production-ready-go

Go
3
star
16

ssbs

Super Simple Build Server
Go
3
star
17

alexa

Go library for creating Amazon Alexa skills with Apex
Go
3
star
18

go-angularjs-jquery-bootstrap-boilerplate

Go + AngularJS + jQuery + Bootstrap boilerplate web application
Go
3
star
19

gotcha

A cloud-friendly web application framework in Go
Go
2
star
20

service.go

A microservice framework for Go
Go
2
star
21

RhUnit

A qUnit compatible javascript unit testing framework for Rhino
JavaScript
2
star
22

go-webapp

Demonstration Go web application
Go
1
star
23

ktee

Tee to a Kafka topic (see https://github.com/ian-kent/ktail)
Go
1
star
24

sfs

Static File Server
Go
1
star
25

bash-env

Bash environment configuration
Shell
1
star
26

dp-florence-api

POC for replacement Florence API
Go
1
star
27

automated-docs

JavaScript
1
star
28

htmlform

HTML form handling for Go
Go
1
star
29

imagestore

S3 backed imagestore for Marathon
Go
1
star
30

packer-ansible-centos-minimal

CentOS 6.5 minimal packer build with ansible install
Shell
1
star
31

civil-service-competency-framework

The (UK) Civil Service Competency Framework - in JSON and TOML
Go
1
star
32

ian-kent.github.io

CSS
1
star
33

learning-elm

Me learning Elm
Elm
1
star
34

vagrant-perl-mojolicious-mongodb

Vagrant build for Ubuntu with Perl, Mojolicious and MongoDB
Shell
1
star