Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12730)

Issue 6445070: code review 6445070: net: enable File method for sockets on windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by mikio
Modified:
11 years, 7 months ago
Reviewers:
minux1, brainman, anacrolix
CC:
golang-dev
Visibility:
Public.

Description

net: enable File method for sockets on windows This CL implements dup method on netFD and makes it possible to use File method for ProtocolConn on Windows. Fixes issue 3827.

Patch Set 1 : diff -r 0934e2afdec9 https://code.google.com/p/go #

Total comments: 1

Patch Set 2 : diff -r f1bf0abeff93 https://code.google.com/p/go #

Patch Set 3 : diff -r b86e4ec1dd66 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -5 lines) Patch
M src/pkg/net/fd_windows.go View 1 1 chunk +18 lines, -5 lines 0 comments Download
M src/pkg/net/file_test.go View 1 2 2 chunks +35 lines, -0 lines 0 comments Download

Messages

Total messages: 17
brainman
Unfortunately, the tests fail: ... === RUN TestFileListener --- FAIL: TestFileListener (0.02 seconds) file_test.go:46: FileListener ...
11 years, 8 months ago (2012-08-12 08:33:24 UTC) #1
mikio
On 2012/08/12 08:33:24, brainman wrote: > Unfortunately, the tests fail: Ouch, thanks for your confirmation. ...
11 years, 8 months ago (2012-08-14 11:01:45 UTC) #2
mikio
Hello alex.brainman@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years, 8 months ago (2012-08-14 11:37:24 UTC) #3
brainman
TestFileMethod pass on windows. But I do not see it doing anything useful there. What ...
11 years, 8 months ago (2012-08-15 06:46:22 UTC) #4
mikio
On Wed, Aug 15, 2012 at 3:46 PM, <alex.brainman@gmail.com> wrote: > TestFileMethod pass on windows. ...
11 years, 8 months ago (2012-08-15 11:11:45 UTC) #5
minux1
http://codereview.appspot.com/6445070/diff/7001/src/pkg/net/fd_windows.go File src/pkg/net/fd_windows.go (right): http://codereview.appspot.com/6445070/diff/7001/src/pkg/net/fd_windows.go#newcode574 src/pkg/net/fd_windows.go:574: // Unimplemented functions. dup() is no longer unimplemented function, ...
11 years, 8 months ago (2012-08-15 16:08:18 UTC) #6
mikio
On 2012/08/15 16:08:18, minux wrote: > src/pkg/net/fd_windows.go:574: // Unimplemented functions. > dup() is no longer ...
11 years, 8 months ago (2012-08-15 17:11:02 UTC) #7
minux1
On Thu, Aug 16, 2012 at 1:11 AM, <mikioh.mikioh@gmail.com> wrote: > On 2012/08/15 16:08:18, minux ...
11 years, 8 months ago (2012-08-15 17:28:16 UTC) #8
brainman
On 2012/08/15 11:11:45, mikio wrote: > ... > > It allows opeating IP-level socket options ...
11 years, 8 months ago (2012-08-15 23:53:18 UTC) #9
mikio
Hello alex.brainman@gmail.com, minux.ma@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 8 months ago (2012-08-16 10:16:37 UTC) #10
mikio
PTAL On 2012/08/15 23:53:18, brainman wrote: > Does it? Lets see some tests to demonstrate ...
11 years, 8 months ago (2012-08-16 10:40:15 UTC) #11
brainman
On 2012/08/16 10:40:15, mikio wrote: > PTAL > test does not compile now: # GOOS=windows ...
11 years, 8 months ago (2012-08-17 06:38:35 UTC) #12
mikio
On 2012/08/17 06:38:35, brainman wrote: > test does not compile now: oops, sorry. > I ...
11 years, 8 months ago (2012-08-21 12:17:21 UTC) #13
mikio
I give up, will abandon. also rsc suggests to using reflect to dig up underlying ...
11 years, 7 months ago (2012-09-04 03:39:12 UTC) #14
mikio
*** Abandoned ***
11 years, 7 months ago (2012-09-04 03:40:29 UTC) #15
anacrolix
On 2012/09/04 03:40:29, mikio wrote: > *** Abandoned *** @mikio: What was the reason for ...
11 years, 7 months ago (2012-09-06 14:03:14 UTC) #16
mikio
11 years, 7 months ago (2012-09-06 14:13:23 UTC) #17
On Thu, Sep 6, 2012 at 11:03 PM,  <anacrolix@gmail.com> wrote:

> @mikio: What was the reason for giving up? Process too difficult or did
> your proposed solution not work?

The latter. I need the underlying socket descriptor for socket options.
In the review process Russ pointed out:

<http://codereview.appspot.com/6482044/>
Please don't use .File() to get a file descriptor. That will disable
non-blocking I/O on the connection. The fd is intentionally hidden, precisely
to
keep people from touching it behind package net's back. To get around that I
would suggest using reflect to dig into the structs and extract the fd integer.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b