Up: GEOS SDK TechDocs | Up | Prev: Socket ... | Next: SocketLoadType ...

SocketError

typedef enum {
        SE_NORMAL = 0x0,
        /*  operation completed successfully */
         
        SE_OUT_OF_MEMORY,
        /*
         *  the net library was unable to allocate memory
         *  either there is no more system memory available, or a net-library
         *  specific upper bound on memory usage has been exceeded
         */
         
        SE_PORT_IN_USE,
        /*
         *  Another socket is already bound to this port, and the
         *  SBF_REUSE_PORT flag was not set.
         */
         
        SE_PORT_ALREADY_LISTENING,
        /*  Another socket is already listening on this port. */
         
        SE_SOCKET_IN_USE,
        /*
         *  The socket is already being used in a way inconsistent with the
         *  requested operation
         */
         
        SE_SOCKET_ALREADY_BOUND,
        /*  The socket is already bound to a port. */
         
        SE_SOCKET_NOT_BOUND,
        /*  The socket must be bound to a port for the requested operation. */
         
        SE_SOCKET_NOT_LISTENING,
        /*  The socket must be listening on a port for the requested operation. */
         
        SE_SOCKET_LISTENING,
        /*  A listening socket cannot be used for outgoing connections */
         
        SE_CONNECTION_REFUSED,
        /*  Nobody is listening on the remote port. */
         
        SE_CONNECTION_FAILED,
        /*  The connection is no longer valid, probably due to a 
         *  link failure. */
         
        SE_CONNECTION_CLOSED,
        /*  The connection has been closed from the other end. */
         
        SE_NON_UNIQUE_CONNECTION,
        /*  Another connection with the same endpoint addresses and ports exists. */
         
        SE_TIMED_OUT,
        /*
         *  The timeout period expired before the operation completed.  
         *  In some cases the protocol may enforce a shorter timeout then 
         *  the user-specified value, so this is possible even where
         *  SOCKET_NO_TIMEOUT is used.
         */
         
        SE_CANT_LOAD_DRIVER,
        /*  A driver required to establish the connection could 
         *  not be loaded. */
         
         
        SE_UNKNOWN_DOMAIN,
        /*  The requested domain is not known to the libarary. */
         
        SE_SYSTEM_SHUTDOWN,
        /*  The operation was aborted because GEOS is exiting */
         
        SE_SOCKET_NOT_CONNECTED,
        /*  The operation requires a connected socket */
         
        SE_SOCKET_ALREADY_CLOSED,
        /*  The send side of the socket is already closed */
         
        SE_SOCKET_BUSY,
        /*  Another thread is operating on the socket */
         
        SE_IMPROPER_CONDITION,
        /*
         *  The requested condition for SocketCheckReady is not valid
         *  for a socket in the current state
         */
         
        SE_INFO_NOT_AVAILABLE,
        /*  The driver could not provide the requested information */
         
        SE_DOMAIN_REQUIRES_16BIT_PORTS,
        /*
         *  The requested domain only allows 16 bit port numbers.  The
         *  SP_manuf field must be set to MANUFACTURER_ID_SOCKET_16BIT_PORT
         */
         
         
        SE_CONNECTION_ERROR,
        /*
         *  The connection was not made for some reason which does not have
         *  it's own specific SocketError
         */
         
            SE_MEDIUM_BUSY,
        /*  The medium required for the connection is not available */
         
            SE_DESTINATION_UNREACHABLE,
        /*  The requested destination is not available */
         
            SE_LINK_FAILED,
        /*
         *  The low level link used for this connection failed or could not be
         *  established
         */
         
            SE_INTERNAL_ERROR,
        /*
         *  The socket library received an impossible error code from the driver.
         *  Either the library or the driver has a bug.
         */
         
            SE_CLOSE_SEND_NOT_SUPPORTED,
        /*
         *  It is not possible to close only the send side of a socket in this
         *  domain.  Use SocketClose instead.
         */
         
        SE_BIND_CONFLICT,
        /*
         *  The same port cannot have both domain restricted and 
         *  domain unrestricted bindings.
         */
         
            SE_ALL_PORTS_BUSY,
        /*
         *  SocketConnect attempted to implicitly bind a socket, 
         *  but failed because all port numbers in the range used by 
         *  implicit binds were in use
         */
         
            SE_SOCKET_NOT_INTERRUPTIBLE,
        /*
         *  An operation which cannot be interrupted is in in progress on the
         *  socket
         */
         
            SE_INTERRUPT,
        /*  The operation was interrupted with SocketInterrupt */
         
            SE_PORT_NOT_LISTENING,
        /* No listening socket or LoadOnMsg request exists for this port */
         
            SE_LISTEN_QUEUE_EMPTY,
        /* No connections are pending for this port */
         
            SE_SOCKET_CLOSED,
        /* The socket must be open for sending to call either
         *  SocketGetSocketName or SocketGetPeerName */
         
        SE_BUFFER_TOO_SMALL,
        /*  Returned by SocketResolve to mean that buffer for resolved 
         *  address is too small */
         
        SE_TEMPORARY_ERROR,
        /* Returned by SocketResolve to indicate that address resolution 
         * is temporarily unavailable for external reasons( such as 
         * network down or server failure )*/
         
        SE_EXCEPTION,
        SE_URGENT = SE_EXCEPTION,
        /* Returned by SocketRecv to indicate that some urgent data 
         *  arrived on a reliable socket or an exception was received 
         * for a datagram socket 
         */
         
        SE_NOT_IMPLEMENTED,
        /* Returned by API functions which are not yet implemented */
         
        SE_CONNECTION_RESET
        /* The connection was reset by the peer, by the local driver (perhaps 
         * in response to SocketCloseDomainMedium()), or by the Socket library
         * because the Socket is freed when its owning thread exits. 
         */
} SocketError;

Certain socket routines generate error values or generate thread errors under certain conditions. The error value will consist of a word-length value: a SocketError value in the low byte, and perhaps a SpecSocketDrError value in the high byte.


Up: GEOS SDK TechDocs | Up | Prev: Socket ... | Next: SocketLoadType ...