It has no remaining users.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
: EINVAL);
}
-/* Returns the error condition associated with socket 'fd' and resets the
- * socket's error status. */
-int
-get_socket_error(int fd)
-{
- int error;
-
- if (getsockopt_int(fd, SOL_SOCKET, SO_ERROR, "SO_ERROR", &error)) {
- error = errno;
- }
- return error;
-}
-
int
check_connection_completion(int fd)
{
int lookup_hostname(const char *host_name, struct in_addr *);
-int get_socket_error(int sock);
int get_socket_rcvbuf(int sock);
int check_connection_completion(int fd);
int drain_rcvbuf(int fd);
return get_exception_errno(e), None
-def get_socket_error(sock):
- """Returns the errno value associated with 'socket' (0 if no error) and
- resets the socket's error status."""
- return sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
-
-
def get_exception_errno(e):
"""A lot of methods on Python socket objects raise socket.error, but that
exception is documented as having two completely different forms of