Skip to content

Commit

Permalink
Merge pull request #5 from marten-seemann/master
Browse files Browse the repository at this point in the history
remove conn.Serve
  • Loading branch information
Stebalien authored Aug 24, 2017
2 parents 8ae55cf + a258c50 commit 5ee63c6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions p2p/muxer/yamux/yamux.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,6 @@ func (c *conn) AcceptStream() (smux.Stream, error) {
return s, err
}

// Serve starts listening for incoming requests and handles them
// using given StreamHandler
func (c *conn) Serve(handler smux.StreamHandler) {
for { // accept loop
s, err := c.AcceptStream()
if err != nil {
return // err always means closed.
}
go handler(s)
}
}

// Transport is a go-peerstream transport that constructs
// yamux-backed connections.
type Transport yamux.Config
Expand Down

0 comments on commit 5ee63c6

Please sign in to comment.