SockAddr can be a tcp/udp socket addr, unix domain socket addr or others
but when using tcp/udp, the SockAddr is always ip+port, if users want to get the ip or port, or pass the addr to other other place which need a SocketAddr, user need to convert it to SocketAddr manually, so change tcp/udp addr type to SocketAddr
SockAddr
can be a tcp/udp socket addr, unix domain socket addr or othersbut when using tcp/udp, the
SockAddr
is always ip+port, if users want to get the ip or port, or pass the addr to other other place which need aSocketAddr
, user need to convert it toSocketAddr
manually, so change tcp/udp addr type toSocketAddr