pub enum ReadError {
EAGAIN,
EBADF,
EFAULT,
EINTR,
EINVAL,
EIO,
EISDIR,
ENOMEM,
OpCode,
}
Variants§
EAGAIN
Non-blocking I/O has been selected using O_NONBLOCK and the read would block.
EBADF
fd is not a valid file descriptor or is not open for reading
EFAULT
buf is outside your accessible address space
EINTR
The call was interrupted by a signal before any data was read
EINVAL
fd is attached to an object which is unsuitable for reading; or the file was opened with the O_DIRECT flag, and either the address specified in buf, the value specified in count, or the current file offset is not suitably aligned
EIO
I/O error. This will happen for example when the process is in a background process group, tries to read from its controlling tty, and either it is ignoring or blocking SIGTTIN or its process group is orphaned. It may also occur when there is a low-level I/O error while reading from a disk or tape.
EISDIR
fd refers to a directory.
ENOMEM
Insufficient memory is available
OpCode
Invalid OpCode. According to RFC-6455: “If an unknown opcode is received, the receiving endpoint MUST Fail the WebSocket Connection”