forked from whyrusleeping/go-smux-multiplex
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
1,004 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
// Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/muxer/mplex. | ||
package peerstream_multiplex | ||
|
||
import ( | ||
"net" | ||
|
||
"github.com/libp2p/go-libp2p-core/network" | ||
|
||
mp "github.com/libp2p/go-mplex" | ||
"github.com/libp2p/go-libp2p/p2p/muxer/mplex" | ||
) | ||
|
||
// DefaultTransport has default settings for Transport | ||
var DefaultTransport = &Transport{} | ||
|
||
var _ network.Multiplexer = &Transport{} | ||
// Deprecated: use github.com/libp2p/go-libp2p/p2p/muxer/mplex.DefaultTransport instead. | ||
var DefaultTransport = mplex.DefaultTransport | ||
|
||
// Transport implements mux.Multiplexer that constructs | ||
// mplex-backed muxed connections. | ||
type Transport struct{} | ||
|
||
func (t *Transport) NewConn(nc net.Conn, isServer bool, scope network.PeerScope) (network.MuxedConn, error) { | ||
m, err := mp.NewMultiplex(nc, isServer, scope) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return (*conn)(m), nil | ||
} | ||
// Deprecated: use github.com/libp2p/go-libp2p/p2p/muxer/mplex.Transport instead. | ||
type Transport = mplex.Transport |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "v0.7.0" | ||
"version": "v0.8.0" | ||
} |