This exception is raised for socket-related error .The accompanying value is either a string telling what went wrong or a pair(errno,string) representing an error returned by a system call
Changed in version 2.6:socket.error is now a child class of IOError.
exception socket.herror
This exception is raised for address-related errors.i.e for functions that use h_errno in the C API, including gethostbyname_ex() and gethostbyaddr().
The accompanying value is a pair (h_errno.string)
exception socket.gaierror
This exception is raised for address-related errors. for getaddrinfo() and getnameinfo().The accompanying value is a pair (error,string)
exception socket.timeout
This exception is raised when a timeout occurs on a socket which has had timeouts enable via a prior call to settimeout().The accompanying value is a string whose value is currently always "timed out"
socket.AF_UNIX/socket.AF_INET/socket.AF_INET
These constants(内容) represent(描绘,表现象征) the address(and protocol) families,used for the first argument to socket. IF the AF_UNIX constant is not defined then this protocol(协议,协定) is unsupported.
exception socket .errorThis exception is raised for socket-related error .The accompanying value is either a string telling what went wrong or a pair(errno,string) representing an error returned by a s