|
@ -1,6 +1,8 @@ |
|
|
package peerstream_multiplex |
|
|
package peerstream_multiplex |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"context" |
|
|
|
|
|
|
|
|
"github.com/libp2p/go-libp2p-core/mux" |
|
|
"github.com/libp2p/go-libp2p-core/mux" |
|
|
mp "github.com/libp2p/go-mplex" |
|
|
mp "github.com/libp2p/go-mplex" |
|
|
) |
|
|
) |
|
@ -16,7 +18,7 @@ func (c *conn) IsClosed() bool { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// OpenStream creates a new stream.
|
|
|
// OpenStream creates a new stream.
|
|
|
func (c *conn) OpenStream() (mux.MuxedStream, error) { |
|
|
func (c *conn) OpenStream(context.Context) (mux.MuxedStream, error) { |
|
|
s, err := c.mplex().NewStream() |
|
|
s, err := c.mplex().NewStream() |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|