Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
9a692ffd
Commit
9a692ffd
authored
Oct 27, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X xnet: Polish a bit
parent
7e2af9df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
go/xcommon/xnet/net.go
go/xcommon/xnet/net.go
+1
-1
go/xcommon/xnet/trace.go
go/xcommon/xnet/trace.go
+4
-3
No files found.
go/xcommon/xnet/net.go
View file @
9a692ffd
...
@@ -83,7 +83,7 @@ type netTLS struct {
...
@@ -83,7 +83,7 @@ type netTLS struct {
}
}
func
(
n
*
netTLS
)
Network
()
string
{
func
(
n
*
netTLS
)
Network
()
string
{
return
n
.
inner
.
Network
()
+
"+tls"
// XXX is this a good idea?
return
n
.
inner
.
Network
()
+
"+tls"
}
}
func
(
n
*
netTLS
)
Dial
(
ctx
context
.
Context
,
addr
string
)
(
net
.
Conn
,
error
)
{
func
(
n
*
netTLS
)
Dial
(
ctx
context
.
Context
,
addr
string
)
(
net
.
Conn
,
error
)
{
...
...
go/xcommon/xnet/trace.go
View file @
9a692ffd
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
package
xnet
package
xnet
// network tracing
// network tracing
// XXX move to xnet/trace ?
import
(
import
(
"context"
"context"
...
@@ -39,7 +38,9 @@ import (
...
@@ -39,7 +38,9 @@ import (
// - because in case of pipenet tracing writes only is enough to get whole network exchange picture
// - because in case of pipenet tracing writes only is enough to get whole network exchange picture
//
//
// 2. Dial only (no Accept)
// 2. Dial only (no Accept)
// XXX text
// - for similar reasons.
//
// WARNING NetTrace functionality is currently very draft.
func
NetTrace
(
inner
Networker
,
tracer
Tracer
)
Networker
{
func
NetTrace
(
inner
Networker
,
tracer
Tracer
)
Networker
{
return
&
netTrace
{
inner
,
tracer
}
return
&
netTrace
{
inner
,
tracer
}
}
}
...
@@ -72,7 +73,7 @@ type TraceTx struct {
...
@@ -72,7 +73,7 @@ type TraceTx struct {
}
}
// netTrace wraps underlying Networker such that whenever a connection is created
// netTrace wraps underlying Networker such that whenever a connection is created
// it is wrapped with traceConn
// it is wrapped with traceConn
.
type
netTrace
struct
{
type
netTrace
struct
{
inner
Networker
inner
Networker
tracer
Tracer
tracer
Tracer
...
...
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