mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 18:11:59 +00:00
derp: clean up derphttp client code, use contexts
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -97,10 +97,13 @@ func (s *Server) isClosed() bool {
|
||||
return s.closed
|
||||
}
|
||||
|
||||
// Accept adds a new connection to the server.
|
||||
// Accept adds a new connection to the server and serves it.
|
||||
//
|
||||
// The provided bufio ReadWriter must be already connected to nc.
|
||||
// Accept blocks until the Server is closed or the connection closes
|
||||
// on its own.
|
||||
//
|
||||
// Accept closes nc.
|
||||
func (s *Server) Accept(nc net.Conn, brw *bufio.ReadWriter) {
|
||||
closed := make(chan struct{})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user