SocketError
public class SocketError: NSObject, Error
this defines all kinds of error in SwiftDSSocket
-
Kinds of Error in SocketError
- socketErrorFCNTL: failure in BSD fcntl function
- socketErrorDefault: default error
- socketErrorIOCTL: failure in BSD ioctl function
- socketErrorWrongAddress: the given address is not correct
- socketErrorAlreadyConnected: the current socket is already connected
- socketErrorIncorrectSocketStatus: conflicts with current socket status
- socketErrorConnecting: failure in connecting to destination
- socketErrorReadSpecific: found error when reading data from sock (return from
read
) - socketErrorWriteSpecific: found error when writing data to sock (return from
write
) - socketErrorSetSockOpt: failure in BSD setsockopt function
Declaration
Swift
public enum ErrorKind
-
specifies error kind
Declaration
Swift
public var errorKind: ErrorKind?
-
specifies error code (only for BSD socket standard error code)
Declaration
Swift
public var socketErrorCode: Int32
-
a description string for this error
Declaration
Swift
public var localizedDescription: String?