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
81efe5bd
Commit
81efe5bd
authored
Jun 14, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9f51b6d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
go/xcommon/xnet/pipenet/pipenet.go
go/xcommon/xnet/pipenet/pipenet.go
+5
-5
No files found.
go/xcommon/xnet/pipenet/pipenet.go
View file @
81efe5bd
...
...
@@ -101,6 +101,7 @@ type socket struct {
// conn represents one endpoint of connection created under Network
type
conn
struct
{
socket
*
socket
peersk
*
socket
// the other side of this connection
net
.
Conn
...
...
@@ -268,8 +269,8 @@ func (l *listener) Accept() (net.Conn, error) {
skc
:=
req
.
from
.
allocFreeSocket
()
sks
:=
h
.
allocFreeSocket
()
skc
.
conn
=
&
conn
{
socket
:
skc
,
Conn
:
pc
}
sks
.
conn
=
&
conn
{
socket
:
sks
,
Conn
:
ps
}
skc
.
conn
=
&
conn
{
socket
:
skc
,
peersk
:
sks
,
Conn
:
pc
}
sks
.
conn
=
&
conn
{
socket
:
sks
,
peersk
:
skc
,
Conn
:
ps
}
n
.
mu
.
Unlock
()
...
...
@@ -338,8 +339,7 @@ func (c *conn) Close() (err error) {
n
.
mu
.
Lock
()
defer
n
.
mu
.
Unlock
()
h
.
socketv
[
sk
.
port
]
=
nil
sk
.
conn
=
nil
if
sk
.
empty
()
{
h
.
socketv
[
sk
.
port
]
=
nil
}
...
...
@@ -355,7 +355,7 @@ func (c *conn) LocalAddr() net.Addr {
// RemoteAddr returns address of remote end of connection
func
(
c
*
conn
)
RemoteAddr
()
net
.
Addr
{
return
c
.
socket
.
addr
()
// FIXME -> must be addr of remote socket
return
c
.
peersk
.
addr
()
}
...
...
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