unix/modsocket: Implement sockaddr() function to decode raw socket address.
Return tuple of (address_family, net_addr, [port, [extra_data]]). net_addr is still raw network address as bytes object, but suitable for passing to inet_ntop() function. At the very least, sockaddr() will separate address family value from binary socket address (and currently, only AF_INET family is decoded).
Showing
想要评论请 注册 或 登录