Packages

A TCP library for Gleam.

Current section

Files

Jump to
tcpea src tcpea client types.gleam
Raw

src/tcpea/client/types.gleam

pub type Socket
pub type TcpeaOptions {
TcpeaOptions(host: String, port: Int, timeout: Int, ip_version: IpVersion)
}
pub type ConnectOptions {
Active(ActiveValue)
Mode(ModeValue)
Inet
Inet6
}
pub type ShutdownOptions {
Read
Write
ReadWrite
}
pub type IpVersion {
Ipv4
Ipv6
/// HappyEyeballs (RFC 8305 is used)
Transparent
}
// TODO: support the stupid integers
pub type ActiveValue {
True
False
Once
}
pub type ModeValue {
Binary
List
}
pub type Error {
/// Connection has closed
Closed
/// Action timed out
Timeout
// https://www.erlang.org/doc/man/inet#type-posix
/// Too long argument list
E2big
/// Permission denied
Eacces
/// Address already in use
Eaddrinuse
/// Cannot assign requested address
Eaddrnotavail
/// Advertise error
Eadv
/// Address family not supported by protocol family
Eafnosupport
/// Resource temporarily unavailable
Eagain
/// EALIGN
Ealign
/// Operation already in progress
Ealready
/// Bad exchange descriptor
Ebade
/// Bad file number
Ebadf
/// File descriptor in bad state
Ebadfd
/// Not a data message
Ebadmsg
/// Bad request descriptor
Ebadr
/// Bad RPC structure
Ebadrpc
/// Bad request code
Ebadrqc
/// Invalid slot
Ebadslt
/// Bad font file format
Ebfont
/// File busy
Ebusy
/// No children
Echild
/// Channel number out of range
Echrng
/// Communication error on send
Ecomm
/// Software caused connection abort
Econnaborted
/// Connection refused
Econnrefused
/// Connection reset by peer
Econnreset
/// Resource deadlock avoided
Edeadlk
/// Resource deadlock avoided
Edeadlock
/// Destination address required
Edestaddrreq
/// Mounting a dirty fs without force
Edirty
/// Math argument out of range
Edom
/// Cross mount point
Edotdot
/// Disk quota exceeded
Edquot
/// Duplicate package name
Eduppkg
/// File already exists
Eexist
/// Bad address in system call argument
Efault
/// File too large
Efbig
/// Host is down
Ehostdown
/// Host is unreachable
Ehostunreach
/// Identifier removed
Eidrm
/// Initialization error
Einit
/// Operation now in progress
Einprogress
/// Interrupted system call
Eintr
/// Invalid argument
Einval
/// I/O error
Eio
/// Socket is already connected
Eisconn
/// Illegal operation on a directory
Eisdir
/// Is a named file
Eisnam
/// Level 2 halted
El2hlt
/// Level 2 not synchronized
El2nsync
/// Level 3 halted
El3hlt
/// Level 3 reset
El3rst
/// ELBIN
Elbin
/// Cannot access a needed shared library
Elibacc
/// Accessing a corrupted shared library
Elibbad
/// Cannot exec a shared library directly
Elibexec
/// Attempting to link in more shared libraries than system limit
Elibmax
/// .lib section in a.out corrupted
Elibscn
/// Link number out of range
Elnrng
/// Too many levels of symbolic links
Eloop
/// Too many open files
Emfile
/// Too many links
Emlink
/// Message too long
Emsgsize
/// Multihop attempted
Emultihop
/// Filename too long
Enametoolong
/// Unavailable
Enavail
/// ENET
Enet
/// Network is down
Enetdown
/// Network dropped connection on reset
Enetreset
/// Network is unreachable
Enetunreach
/// File table overflow
Enfile
/// Anode table overflow
Enoano
/// No buffer space available
Enobufs
/// No CSI structure available
Enocsi
/// No data available
Enodata
/// No such device
Enodev
/// No such file or directory
Enoent
/// Exec format error
Enoexec
/// No locks available
Enolck
/// Link has been severed
Enolink
/// Not enough memory
Enomem
/// No message of desired type
Enomsg
/// Machine is not on the network
Enonet
/// Package not installed
Enopkg
/// Bad protocol option
Enoprotoopt
/// No space left on device
Enospc
/// Out of stream resources or not a stream device
Enosr
/// Unresolved symbol name
Enosym
/// Function not implemented
Enosys
/// Block device required
Enotblk
/// Socket is not connected
Enotconn
/// Not a directory
Enotdir
/// Directory not empty
Enotempty
/// Not a named file
Enotnam
/// Socket operation on non-socket
Enotsock
/// Operation not supported
Enotsup
/// Inappropriate device for ioctl
Enotty
/// Name not unique on network
Enotuniq
/// No such device or address
Enxio
/// Operation not supported on socket
Eopnotsupp
/// Not owner
Eperm
/// Protocol family not supported
Epfnosupport
/// Broken pipe
Epipe
/// Too many processes
Eproclim
/// Bad procedure for program
Eprocunavail
/// Wrong program version
Eprogmismatch
/// RPC program unavailable
Eprogunavail
/// Protocol error
Eproto
/// Protocol not supported
Eprotonosupport
/// Wrong protocol type for socket
Eprototype
/// Math result unrepresentable
Erange
/// EREFUSED
Erefused
/// Remote address changed
Eremchg
/// Remote device
Eremdev
/// Pathname hit remote filesystem
Eremote
/// Remote I/O error
Eremoteio
/// EREMOTERELEASE
Eremoterelease
/// Read-only filesystem
Erofs
/// Wrong RPC version
Erpcmismatch
/// Object is remote
Erremote
/// Cannot send after socket shutdown
Eshutdown
/// Socket type not supported
Esocktnosupport
/// Invalid seek
Espipe
/// No such process
Esrch
/// Srmount error
Esrmnt
/// Stale remote file handle
Estale
/// Error 0
Esuccess
/// Timer expired
Etime
/// Connection timed out
Etimedout
/// Too many references
Etoomanyrefs
/// Text file or pseudo-device busy
Etxtbsy
/// Structure needs cleaning
Euclean
/// Protocol driver not attached
Eunatch
/// Too many users
Eusers
/// Version mismatch
Eversion
/// Operation would block
Ewouldblock
/// Cross-device link
Exdev
/// Message tables full
Exfull
/// Hostname or domain name cannot be found
Nxdomain
}