fd just a int number, you can get it use reflect 
<https://stackoverflow.com/questions/62126638/cant-get-fd-from-tls-conn>. 

and you can use WinSocket2 funs by Dll(ws2_32.dll).

在2018年12月5日星期三 UTC+8 04:41:03<apma...@gmail.com> 写道:

> Hi
>
> My problem is following: I need to use windows WSAAccept() instead of 
> normal accept (net package seems to use AcceptEx).
>
> I'm I missing somethig 
>
> I do not know a way to extend net-package so only way I know is to use 
> reflect to get the listener Sysfd (I know .. really bad, other options ?) 
> and pass it to WSAAccept().
>
> Now I get the new handle/fd back and to be able to use rest of the code I 
> would need to convert it to net.conn, how can I do this ?
>
> In general, how can we extend net package when all important structures 
> are private ? fd_windows.go:netFD struct includes poll.FD what is even 
> deeper at package chain.
>
> Br,
> Ari
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2c1e6676-0613-4005-a99c-daf5cfa209c2n%40googlegroups.com.

Reply via email to