Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
a3b46bfe
Commit
a3b46bfe
authored
Nov 08, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add deadline methods to stream
parent
d1b6fd62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
package.json
package.json
+12
-12
swarm_stream.go
swarm_stream.go
+14
-1
No files found.
package.json
View file @
a3b46bfe
...
...
@@ -9,9 +9,9 @@
"gxDependencies"
:
[
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
dysBu77i3YaagNtMAjiCJdeWWvds18ho5XEB784guQ4
1"
,
"hash"
:
"Qm
U3pGGVT1riXp5dBJbNrGpxssVScfvk9236drRHZZbKJ
1"
,
"name"
:
"go-libp2p-net"
,
"version"
:
"1.
5
.0"
"version"
:
"1.
6
.0"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -39,21 +39,21 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
fXgTygwsTPyUWPWTAeBK6cFtTdMqmeeqhyhcNMhRpT1g
"
,
"hash"
:
"Qm
WUNsat6Jb19nC5CiJCDXepTkxjdxi3eZqeoB6mrmmaGu
"
,
"name"
:
"go-smux-spdystream"
,
"version"
:
"1.
1.1
"
"version"
:
"1.
2.0
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
etupZ62uEdoqNsbZUCgqU3JyfssExBfqBwBhDpjyE6eW
"
,
"hash"
:
"Qm
TfjLsou9ic6L4KqCcmbLSZcdiFu8q1v6njKp121pbbXx
"
,
"name"
:
"go-smux-multistream"
,
"version"
:
"1.
4
.0"
"version"
:
"1.
5
.0"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
SHTSkxXGQgaHWz91oZV3CDy3hmKmDgpjbYRT6niACG4E
"
,
"hash"
:
"Qm
bn7RYyWzBVXiUp9jZ1dA4VADHy9DtS7iZLwfhEUQvm3U
"
,
"name"
:
"go-smux-yamux"
,
"version"
:
"1.
1.1
"
"version"
:
"1.
2.0
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -69,15 +69,15 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
S9en3mcwW2HRSeRabceJEGVxTZF4vEeFm7JHWQwWsb1U
"
,
"hash"
:
"Qm
VwFjMdejJ8mGVmgyR2mKcUHrvNBDtDsKRT99soVbkFhA
"
,
"name"
:
"go-peerstream"
,
"version"
:
"1.
4.1
"
"version"
:
"1.
5.0
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
VcNzHewFvmVah1CGqg8NV7nHHsPu19U43YE5b2oqWyBp
"
,
"hash"
:
"Qm
X4j1JhubdEt4EB1JY1mMKTvJwPZSRzTv3uwh5zaDqyAi
"
,
"name"
:
"go-libp2p-metrics"
,
"version"
:
"1.
5
.0"
"version"
:
"1.
6
.0"
},
{
"author"
:
"whyrusleeping"
,
...
...
swarm_stream.go
View file @
a3b46bfe
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
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment