ChannelError

public enum ChannelError : Error

An error that can occur on Channel operations.

  • Tried to connect on a Channel that is already connecting.

    Declaration

    Swift

    case connectPending
  • Connect operation timed out

    Declaration

    Swift

    case connectTimeout(TimeAmount)
  • Connect operation failed

    Declaration

    Swift

    case connectFailed(NIOConnectionError)
  • Unsupported operation triggered on a Channel. For example connect on a ServerSocketChannel.

    Declaration

    Swift

    case operationUnsupported
  • An I/O operation (e.g. read/write/flush) called on a channel that is already closed.

    Declaration

    Swift

    case ioOnClosedChannel
  • Close was called on a channel that is already closed.

    Declaration

    Swift

    case alreadyClosed
  • Output-side of the channel is closed.

    Declaration

    Swift

    case outputClosed
  • Input-side of the channel is closed.

    Declaration

    Swift

    case inputClosed
  • eof

    A read operation reached end-of-file. This usually means the remote peer closed the socket but it’s still open locally.

    Declaration

    Swift

    case eof
  • A Channel write was made with a data type not supported by the channel type: e.g. an AddressedEnvelope for a stream channel.

    Declaration

    Swift

    case writeDataUnsupported
  • A DatagramChannel write was made with a buffer that is larger than the MTU for the connection, and so the datagram was not written. Either shorten the datagram or manually fragment, and then try again.

    Declaration

    Swift

    case writeMessageTooLarge
  • A DatagramChannel write was made with an address that was not reachable and so could not be delivered.

    Declaration

    Swift

    case writeHostUnreachable
  • Declaration

    Swift

    public static func ==(lhs: ChannelError, rhs: ChannelError) -> Bool