Asymmetric socket option syscall


I’m trying to build a server and a client with Go. However, I only find SetsockoptString() in the syscall but no function GetsockoptString(). ( Are there any ideas to have such call? It is kind of weird to me that the syscall functions are not symmetric.


I have no answer to your question, but it seems worth noting that the syscall package seems deprecated:

NOTE: This package is locked down. Code outside the standard Go repository should be migrated to use the corresponding package in the repository

However, the sys package does not seem to resolve your problem. The setsockopt/getsockopt asymmetry is still there.

Thank you! It’s good to know that package is deprecated. You are right, it seems that they only move this part directly to the new package…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.