context

command
Version: v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

context implements a request/reply server that utilizes a pool of worker goroutines to service multiple requests simultaneously. Each goroutine has it's own context which keeps track of which client the request came from so that it can reply to the correct client.

The server is a listening rep socket, and client is a dialing req socket.

To use:

$ go build .
$ url=tcp://127.0.0.1:40899
$
$ ./context server $url & server=$! && sleep 1
$ ./context client $url "John"
$ ./context client $url "Bill"
$ ./context client $url "Mary"
$ ./context client $url "Susan"
$ ./context client $url "Mark"

$ kill $server

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL