getsockopt

getsockopt SOCKET,LEVEL,OPTNAME
Returns the socket option requested, or undef if there is an error.