Discover Packages
github.com/bradfitz/runsit
listen
package
Version:
v0.0.0-...-92059fe
Opens a new window with list of versions in this module.
Published: Jul 16, 2016
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 5
Opens a new window with list of known importers.
Documentation
Documentation
¶
Listen is a replacement for net.Listen that also respects runsit
listeners: port, :port, ip:port, FD:<fd_num>, ADDR:<name> or <name>
named ports.
Listeners are always TCP.
Usage returns a descriptive usage message for a flag given the name
of thing being addressed.
Addr is a flag variable. Use like:
var webPort listen.Addr
flag.Var(&webPort, "web_addr", listen.Usage("Web server address"))
flag.Parse()
webListener, err := webPort.Listen()
NewFlag returns a flag that implements the flag.Value interface.
Listen returns the address's TCP listener.
Set implements the flag.Value interface.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.