Content


NTL
Core
ISocket

ISocket



Describes platform socket.

You can find more information in comments below.

class ISocket
{
public:
    enum class ErrorType // Error types
    {
        InvalidHandle,
        NotEnoughMemory,
        InvalidParameter,
        OperationAborted,
        IOIncomplete,
        IOPending,
        InterruptedCall,
        InvalidFileHandle,
        PermissionDenied,
        BadAddress,
        InvalidArgument,
        TooManyOpenedFiles,
        OperationInProgress,
        OperationOnNonSocket,
        DestinationAddressRequird,
        MessageTooLong,
        WrongProtocolType,
        BadProtocolOption,
        ProtocolNotSupported,
        SocketTypeNotSupported,
        OperationNotSupported,
        ProtocolFamilyNotSupported,
        AddressfamilyNotSupported,
        AddressInUse,
        CannotAssignAddress,
        NetworkDown,
        NetworkUnreachable,
        NetwordDropConnection,
        SoftwareConnectionAbort,
        ConnectionResetByPeer,
        NoBufferSpaceAvailable,
        SocketAlreadyConnected,
        SocketNotConnected,
        CannotSendAfterShutdown,
        TooManyReferences,
        ConnectionTimeout,
        ConnectionRefused,
        CannotTranslateName,
        NameTooLong,
        HostDown,
        NoRouteToHost,
        DirectoryNotEmpty,
        TooManyProcesses,
        UserQuotaExceeded,
        DiskQuotaExceeded,
        StaleFileHandleReference,
        ItemIsRemote,
        NetworkSubsystemUnavailable,
        LibraryVersionOutOfRange,
        NoStartup,
        GracefulShutdownInProgress,
        NoMoreResults,
        Callcancelled,
        ProcedureCallTableInvalid,
        ServiceProviderInvalid,
        ServiceProviderFailedToInitialize,
        SystemCallFailed,
        ServiceNotFound,
        ClassTypeNotFound,
        CallCancelled,
        DatabaseQueryRefused,
        HostNotFound,
        NonAuthoritativeHostNotFound,
        NonRecoverableError,
        NoDataRecord,
        QoSReceivers,
        QoSSenders,
        NoQoSSenders,
        NoQoSReceivers,
        QoSRequestConfirmed,
        QoSAdmissionError,
        QoSPolicyFailed,
        QoSBadStyle,
        QoSBadObject,
        QoSTrafficControlError,
        QoSGenericError,
        QoSServiceTypeError,
        QoSFlowspecError,
        InvalidQoSProviderBuffer,
        InvalidQoSFilterStyle,
        InvalidQoSFilterType,
        IncorrectQoSFilterCount,
        InvalidQoSObjectLength,
        InvalidQoSFlowCount,
        UnrecognizedQoSObject,
        InvalidQoSPolicyObject,
        InvalidQoSFlowDescriptor,
        InvalidQoSProviderFlowSpec,
        InvalidQoSProviderFilterSpec,
        InvalidQoSShapeDiscardModeObject,
        InvalidQoSShapingRateObject,
        ReservedPolicyQoSElementType,

        Unknown
    };

    enum class DataExist // Data availability
    {
        Error,
        Disconnected,
        Exist,
        None
    };
public:
    virtual AnsiString getLocalIp() = 0; // Return local IP address
    virtual AnsiString getRemoteIp() = 0; // Return remote IP address
    virtual int getLocalPort() = 0; // Return local port
    virtual int getRemotePort() = 0; // Return remote port

    virtual void Release() = 0; // Close connection and destroy itself
};
Namespace: nitisa
Include: Nitisa/Interfaces/ISocket.h