Top Level Namespace

Defined in:

Constant Summary

DEFAULT_DELAY = 200_i64
DEFAULT_PORT = 1234
DELAY_VARIANCE = 0.1
HELP_BANNER = "Use delay-proxy [target-host:]port [proxy-port] [delay in milliseconds]"
SOCKET_BUFFER_SIZE = (1024 * 1024) * 8
VERSION = {{ (`shards version \"/srv/crystaldoc.info/github-hugopl-delay-proxy-v0.1.0/src\"`).chomp.stringify }}

Method Summary

Method Detail

def forward_socket(src : IO, dst : IO, label, delay : Int) #

[View source]
def handle_connection(proxy_socket : Socket, target_host : String, target_port : Int, delay : Int64) #

[View source]
def main #

[View source]
def parse_host_port(_nil : Nil, default_port : Int) #

[View source]
def parse_host_port(str : String, default_port : Int | Nil = nil) #

[View source]
def parse_options #

[View source]
def random_delay(delay : Int) #

[View source]