diff --git a/package.json b/package.json index e204dc42a89ec6f9805334c3c4f1a9ceb34be419..e51525d7a0ff5eb2a99704597f1a91437e7b2f1a 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "gxDependencies": [ { "author": "whyrusleeping", - "hash": "QmdysBu77i3YaagNtMAjiCJdeWWvds18ho5XEB784guQ41", + "hash": "QmU3pGGVT1riXp5dBJbNrGpxssVScfvk9236drRHZZbKJ1", "name": "go-libp2p-net", - "version": "1.5.0" + "version": "1.6.0" }, { "author": "whyrusleeping", @@ -39,21 +39,21 @@ }, { "author": "whyrusleeping", - "hash": "QmfXgTygwsTPyUWPWTAeBK6cFtTdMqmeeqhyhcNMhRpT1g", + "hash": "QmWUNsat6Jb19nC5CiJCDXepTkxjdxi3eZqeoB6mrmmaGu", "name": "go-smux-spdystream", - "version": "1.1.1" + "version": "1.2.0" }, { "author": "whyrusleeping", - "hash": "QmetupZ62uEdoqNsbZUCgqU3JyfssExBfqBwBhDpjyE6eW", + "hash": "QmTfjLsou9ic6L4KqCcmbLSZcdiFu8q1v6njKp121pbbXx", "name": "go-smux-multistream", - "version": "1.4.0" + "version": "1.5.0" }, { "author": "whyrusleeping", - "hash": "QmSHTSkxXGQgaHWz91oZV3CDy3hmKmDgpjbYRT6niACG4E", + "hash": "Qmbn7RYyWzBVXiUp9jZ1dA4VADHy9DtS7iZLwfhEUQvm3U", "name": "go-smux-yamux", - "version": "1.1.1" + "version": "1.2.0" }, { "author": "whyrusleeping", @@ -69,15 +69,15 @@ }, { "author": "whyrusleeping", - "hash": "QmS9en3mcwW2HRSeRabceJEGVxTZF4vEeFm7JHWQwWsb1U", + "hash": "QmVwFjMdejJ8mGVmgyR2mKcUHrvNBDtDsKRT99soVbkFhA", "name": "go-peerstream", - "version": "1.4.1" + "version": "1.5.0" }, { "author": "whyrusleeping", - "hash": "QmVcNzHewFvmVah1CGqg8NV7nHHsPu19U43YE5b2oqWyBp", + "hash": "QmX4j1JhubdEt4EB1JY1mMKTvJwPZSRzTv3uwh5zaDqyAi", "name": "go-libp2p-metrics", - "version": "1.5.0" + "version": "1.6.0" }, { "author": "whyrusleeping", diff --git a/swarm_stream.go b/swarm_stream.go index 771038621f18a907db2b2bf668fce48bc173b10a..adadca78ec4af493af729ae8c7f4ba8488be9cb8 100644 --- a/swarm_stream.go +++ b/swarm_stream.go @@ -1,9 +1,10 @@ package swarm import ( + "time" + inet "github.com/libp2p/go-libp2p-net" protocol "github.com/libp2p/go-libp2p-protocol" - ps "github.com/libp2p/go-peerstream" ) @@ -49,3 +50,15 @@ func (s *Stream) Protocol() protocol.ID { func (s *Stream) SetProtocol(p protocol.ID) { (*ps.Stream)(s).SetProtocol(p) } + +func (s *Stream) SetDeadline(t time.Time) error { + return s.Stream().SetDeadline(t) +} + +func (s *Stream) SetReadDeadline(t time.Time) error { + return s.Stream().SetReadDeadline(t) +} + +func (s *Stream) SetWriteDeadline(t time.Time) error { + return s.Stream().SetWriteDeadline(t) +}