Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: API to tweak IP level socket options #3684

Closed
gopherbot opened this issue May 29, 2012 · 16 comments
Closed

net: API to tweak IP level socket options #3684

gopherbot opened this issue May 29, 2012 · 16 comments

Comments

@gopherbot
Copy link

by abiola89:

net.ListenMulticastUDP sets IP_MULTICAST_LOOP=0, so after joining multicast with
net.ListenMulticastUDP you never receive your own sent data if you run both sender and
receiver on (logically) same IP host.

The code here http://play.golang.org/p/MMW3M26v2R is expected to echo what is being
input.

Tested on Windows 8 and XP both with go1 8g compilers and failed to echo as expected.
But worked on Ubuntu 11.10 also go1 8g compiler.

Thanks.
@mikioh
Copy link
Contributor

mikioh commented May 30, 2012

Comment 1:

I also feel want to have both socket and IP level option tweaking API 
sometimes. The problem to me is how designs nice and simple API 
because socket/IP level options contain tons of toggles; e.g., tons 
of member functions per ProtocolConn make me discourage...

Labels changed: added priority-later, removed priority-triage.

@robpike
Copy link
Contributor

robpike commented Jun 1, 2012

Comment 2:

Status changed to Accepted.

@alexbrainman
Copy link
Member

Comment 3:

This is what your program prints on my Windows:
-----------------
Input: 123
Input: read 123
456
Input: read 456
789
Input: read 789
panic: EOF
-----------------
Is that correct output or not? Either way, please, provide simpler program that does not
need any user input. And tell us what does new program prints when it runs, and what you
expect it to print instead. I do not know anything about multicast, so you have to be
specific. We could even use it to add new test to net package.
BTW, your program crashes on my linux computer:
panic: joinipv4group udp4 X.X.X.X: setsockopt: invalid argument
goroutine 1 [running]:
main.check(0x186344e0, 0x18634480)
        /root/t2/test.go:42 +0x46
main.main()
        /root/t2/test.go:17 +0xdd
goroutine 2 [syscall]:
created by runtime.main
        /root/hg/go/src/pkg/runtime/proc.c:221
goroutine 3 [syscall]:
syscall.Syscall6()
        /root/hg/go/src/pkg/syscall/asm_linux_386.s:0 +0x27
syscall.EpollWait(0x6, 0x18638008, 0xa, 0xa, 0xffffffff, ...)
        /root/hg/go/src/pkg/syscall/env_unix.go:0 +0x78
net.(*pollster).WaitFD(0x18638000, 0x18601540, 0x0, 0x0, 0x0, ...)
        /root/hg/go/src/pkg/net/fd_linux.go:146 +0x10c
net.(*pollServer).Run(0x18601540, 0x0)
        /root/hg/go/src/pkg/net/fd.go:236 +0xdf
created by net.newPollServer
        /root/hg/go/src/pkg/net/newpollserver.go:35 +0x308
exit status 2
Alex

@mikioh
Copy link
Contributor

mikioh commented Aug 7, 2012

Comment 4:

Issue #3826 has been merged into this issue.

@mikioh
Copy link
Contributor

mikioh commented Aug 7, 2012

@mikioh
Copy link
Contributor

mikioh commented Aug 30, 2012

Comment 6:

read, writemsg on IPConn
http://golang.org/cl/6426047/
go.net.ipv4 package proposal
http://golang.org/cl/6482044/

@davecheney
Copy link
Contributor

Comment 7:

Hi Mikio,
I've been following this set of changes closely, so I have an idea
what is going on, but I think it would be useful to send a quick email
to golang-dev explaining how all these CL's fit together and their
goal.

@mikioh
Copy link
Contributor

mikioh commented Sep 6, 2012

Comment 8:

Issue #3827 has been merged into this issue.

@mikioh
Copy link
Contributor

mikioh commented Sep 26, 2012

Comment 9:

This issue was closed by revision golang/net@d2e5a12.

Status changed to Fixed.

@anacrolix
Copy link
Contributor

Comment 10:

Just curious about this check-in. Is it for the net/ipv4 package? The URL is not found.
keen to test it out.

@rsc
Copy link
Contributor

rsc commented Sep 26, 2012

Comment 11:

'go get code.google.com/p/go.net/ipv4'.

@anacrolix
Copy link
Contributor

Comment 12:

Thanks. Works with tip.

@mikioh
Copy link
Contributor

mikioh commented Jun 16, 2013

Comment 13:

This issue was updated by revision golang/net@b073adc.

R=dave
CC=golang-dev
https://golang.org/cl/10125044

@anacrolix
Copy link
Contributor

Comment 14:

404. That’s an error.
The requested URL /p/go/source/detail?r=b8dd04764dae was not found on this server.
That’s all we know.

@rsc
Copy link
Contributor

rsc commented Jun 21, 2013

Comment 15:

The right URL is https://code.google.com/p/go/source/detail?r=b8dd04764dae&repo=net.
I'll file a bug against Google Code.

@rsc
Copy link
Contributor

rsc commented Jun 21, 2013

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants