Version: v2.0.0 Latest Latest

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



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://
$ ./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