Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeTCP ¶
func ServeTCP(ctxFact func() HoContext, addr string, cb func(*net.TCPListener)) (err error)
Serve with a hosting context factory, at specified local address (host:port)
`cb` will be called with the created `*net.TCPListener`, it's handful to specify port as 0, and receive the actual port from the cb.
This func won't return until the listener is closed.
Types ¶
Click to show internal directories.
Click to hide internal directories.