Skip to content

Commit

Permalink
migrate to consolidated types; add travis config. (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk authored May 26, 2019
1 parent f73d3f6 commit cb81de4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions p2p/muxer/yamux/yamux.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io/ioutil"
"net"

smux "github.com/libp2p/go-stream-muxer"
mux "github.com/libp2p/go-libp2p-core/mux"
yamux "github.com/libp2p/go-yamux"
)

Expand All @@ -24,7 +24,7 @@ func (c *conn) IsClosed() bool {
}

// OpenStream creates a new stream.
func (c *conn) OpenStream() (smux.Stream, error) {
func (c *conn) OpenStream() (mux.MuxedStream, error) {
s, err := c.yamuxSession().OpenStream()
if err != nil {
return nil, err
Expand All @@ -34,7 +34,7 @@ func (c *conn) OpenStream() (smux.Stream, error) {
}

// AcceptStream accepts a stream opened by the other side.
func (c *conn) AcceptStream() (smux.Stream, error) {
func (c *conn) AcceptStream() (mux.MuxedStream, error) {
s, err := c.yamuxSession().AcceptStream()
return s, err
}
Expand All @@ -61,7 +61,7 @@ func init() {
DefaultTransport = (*Transport)(config)
}

func (t *Transport) NewConn(nc net.Conn, isServer bool) (smux.Conn, error) {
func (t *Transport) NewConn(nc net.Conn, isServer bool) (mux.MuxedConn, error) {
var s *yamux.Session
var err error
if isServer {
Expand Down
4 changes: 2 additions & 2 deletions p2p/muxer/yamux/yamux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package sm_yamux
import (
"testing"

test "github.com/libp2p/go-stream-muxer/test"
tmux "github.com/libp2p/go-libp2p-testing/suites/mux"
)

func TestYamuxTransport(t *testing.T) {
test.SubtestAll(t, DefaultTransport)
tmux.SubtestAll(t, DefaultTransport)
}

0 comments on commit cb81de4

Please sign in to comment.