The golang.org/x/net/ipv4 package obtains the connection's file descriptor by using reflection ( https://github.com/golang/net/blob/master/ipv4/helper_unix.go). Once you have that you can perform any system calls you might need on it.
On Tue, Aug 23, 2016 at 8:07 PM Jingcheng Zhang <dio...@gmail.com> wrote: > Then I'll make a try. As far as I know, Linux supports TCP_CORK, FreeBSD > supports TCP_NOPUSH, > OpenBSD and NetBSD seem not having this option. Currently I have no idea > of Darwin, Plan 9 and Windows. > > I'm curious on how to add this support into golang.org/x/net, as this is > a net.(*TCPConn) method. > > On Tuesday, August 23, 2016 at 9:29:03 PM UTC+8, Ian Lance Taylor wrote: > >> On Tue, Aug 23, 2016 at 4:35 AM, Jingcheng Zhang <dio...@gmail.com> >> wrote: >> > >> > I'm writing a network program which requires a call to SetNoPush() of >> > (*TCPConn), however it doesn't exist in current TCPConn type. >> > Any plan to implements this method? >> >> I have not heard of any plans to implement that. It's not portable >> anyhow. Perhaps it could be added to golang.org/x/net somehow. >> >> Ian >> > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.