Skip to content

socket reader中增加来源ip - #675

Merged
wonderflow merged 1 commit into
qiniu:masterfrom
redHJ:pdr-6970
Jul 31, 2018
Merged

wonderflow merged 1 commit into
qiniu:masterfrom
redHJ:pdr-6970

Conversation

@redHJ

@redHJ redHJ commented Jul 31, 2018

Copy link
Copy Markdown
Collaborator

@redHJ
redHJ force-pushed the pdr-6970 branch 4 times, most recently from 514d6d8 to 577679e Compare July 31, 2018 03:48
Comment thread reader/socket/socket.go
// if remote addr is empty, get local addr
if localAddr := c.LocalAddr(); localAddr != nil {
ssr.readChan <- socketInfo{address: localAddr.String(), data: scnr.Bytes()}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不要分逻辑。

Comment thread reader/socket/socket.go
// if remote addr is empty, get local addr
if localAddr := psr.PacketConn.LocalAddr(); localAddr != nil {
psr.readChan <- socketInfo{address: localAddr.String(), data: buf[:n]}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

@wonderflow

Copy link
Copy Markdown
Contributor

LGTM

@wonderflow
wonderflow merged commit dca1753 into qiniu:master Jul 31, 2018
@redHJ
redHJ deleted the pdr-6970 branch January 24, 2019 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址