Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p-quic-transport
Commits
d80e1ffe
Unverified
Commit
d80e1ffe
authored
Jun 15, 2018
by
Marten Seemann
Committed by
GitHub
Jun 15, 2018
Browse files
Merge pull request #14 from libp2p/context-dial
use the context for dialing
parents
bd68e9bc
781cd318
Changes
1
Hide whitespace changes
Inline
Side-by-side
transport.go
View file @
d80e1ffe
...
@@ -26,8 +26,6 @@ var quicConfig = &quic.Config{
...
@@ -26,8 +26,6 @@ var quicConfig = &quic.Config{
},
},
}
}
var
quicDialAddr
=
quic
.
DialAddr
// The Transport implements the tpt.Transport interface for QUIC connections.
// The Transport implements the tpt.Transport interface for QUIC connections.
type
transport
struct
{
type
transport
struct
{
privKey
ic
.
PrivKey
privKey
ic
.
PrivKey
...
@@ -84,7 +82,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
...
@@ -84,7 +82,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
}
}
return
nil
return
nil
}
}
sess
,
err
:=
quicDialAddr
(
host
,
tlsConf
,
quicConfig
)
sess
,
err
:=
quic
.
DialAddr
Context
(
ctx
,
host
,
tlsConf
,
quicConfig
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
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