Thank you for your answer. In case someone else is interested, the answer I was looking for was: the Dialer struct has an optional Control member, that the user can set. It's a a function that will be called before the connect() syscall is issued, allowing to set whatever socket options before issuing the tcp connection. On Friday, October 8, 2021 at 7:07:22 PM UTC+1 seank...@gmail.com wrote:
> net.TCPConn.SyscallConn exposes the fd which you can use with sycalls > > On Friday, October 8, 2021 at 7:05:40 PM UTC+2 bjeun...@gmail.com wrote: > >> Hi, >> >> looking at the net package of the standard library, I don't see a way to >> set the tcp max segment size. Surely, one can create a tcp connection >> manually and set the segment size by using the syscall package, but that >> approach prevents them from reusing higher level packages that want a >> net.Dialer, for example crypto/tls. So in short, to create a tls >> connection in golang and set its TCP MSS, one has to reimplement tls, >> unless I missed something. >> >> Would it make sense to have a dialer field for the MSS? >> > -- 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/3711b55e-6e2c-49b8-b723-7cc74fd528c3n%40googlegroups.com.