Name

SPVM::Sys::Socket::Errno - Socket Error Numbers

Description

Sys::Socket::Errno class in SPVM has methods to get socket error numbers.

Usage

use Sys::Socket::Errno;

my $errno = Sys::Socket::Errno->errno;

my $strerror = Sys::Socket::Errno->strerror($errno);

Class Methods

errno

static method errno : int ();

Returns errno related to sockets in a portable way.

strerror

static method strerror : string ($errno : int, $length : int = 0);

Returns strerror related to sockets in a portable way given enough length $max_length to hold the error message..

If $length is 0, an appropriate default value is set.

is_read_again

static method is_read_again : int ($errno : int);

If the error number $errno returned by "errno" method is the return value of "EWOULDBLOCK" or "EINTR", returns 1, otherwise returns 0.

is_write_again

static method is_write_again : int ($errno : int);

If the error number $errno returned by "errno" method is the return value of "EWOULDBLOCK" or "EINTR", returns 1, otherwise returns 0.

is_connect_again

static method is_connect_again : int ($errno : int);

If the error number $errno returned by "errno" method is the return value of "EWOULDBLOCK", "EINPROGRESS" or "EINTR", returns 1, otherwise returns 0.

is_accept_again

static method is_accept_again : int ($errno : int);

If the error number $errno returned by "errno" method is the return value of "EWOULDBLOCK" or "EINTR", returns 1, otherwise returns 0.

EINTR

static method EINTR : int ();

Calls Errno#WSAEINTR method in Windows, or Errno#EINTR method in other OSs, and returns its return value.

EBADF

static method EBADF : int ();

Calls Errno#WSAEBADF method in Windows, or Errno#EBADF method in other OSs, and returns its return value.

EACCES

static method EACCES : int ();

Calls Errno#WSAEACCES method in Windows, or Errno#EACCES method in other OSs, and returns its return value.

EFAULT

static method EFAULT : int ();

Calls Errno#WSAEFAULT method in Windows, or Errno#EFAULT method in other OSs, and returns its return value.

EINVAL

static method EINVAL : int ();

Calls Errno#WSAEINVAL method in Windows, or Errno#EINVAL method in other OSs, and returns its return value.

EMFILE

static method EMFILE : int ();

Calls Errno#WSAEMFILE method in Windows, or Errno#EMFILE method in other OSs, and returns its return value.

EWOULDBLOCK

static method EWOULDBLOCK : int ();

Calls Errno#WSAEWOULDBLOCK method in Windows, or Errno#EWOULDBLOCK method in other OSs, and returns its return value.

EINPROGRESS

static method EINPROGRESS : int ();

Calls Errno#WSAEINPROGRESS method in Windows, or Errno#EINPROGRESS method in other OSs, and returns its return value.

EALREADY

static method EALREADY : int ();

Calls Errno#WSAEALREADY method in Windows, or Errno#EALREADY method in other OSs, and returns its return value.

ENOTSOCK

static method ENOTSOCK : int ();

Calls Errno#WSAENOTSOCK method in Windows, or Errno#ENOTSOCK method in other OSs, and returns its return value.

EDESTADDRREQ

static method EDESTADDRREQ : int ();

Calls Errno#WSAEDESTADDRREQ method in Windows, or Errno#EDESTADDRREQ method in other OSs, and returns its return value.

EMSGSIZE

static method EMSGSIZE : int ();

Calls Errno#WSAEMSGSIZE method in Windows, or Errno#EMSGSIZE method in other OSs, and returns its return value.

EPROTOTYPE

static method EPROTOTYPE : int ();

Calls Errno#WSAEPROTOTYPE method in Windows, or Errno#EPROTOTYPE method in other OSs, and returns its return value.

ENOPROTOOPT

static method ENOPROTOOPT : int ();

Calls Errno#WSAENOPROTOOPT method in Windows, or Errno#ENOPROTOOPT method in other OSs, and returns its return value.

EPROTONOSUPPORT

static method EPROTONOSUPPORT : int ();

Calls Errno#WSAEPROTONOSUPPORT method in Windows, or Errno#EPROTONOSUPPORT method in other OSs, and returns its return value.

ESOCKTNOSUPPORT

static method ESOCKTNOSUPPORT : int ();

Calls Errno#WSAESOCKTNOSUPPORT method in Windows, or Errno#ESOCKTNOSUPPORT method in other OSs, and returns its return value.

EOPNOTSUPP

static method EOPNOTSUPP : int ();

Calls Errno#WSAEOPNOTSUPP method in Windows, or Errno#EOPNOTSUPP method in other OSs, and returns its return value.

EPFNOSUPPORT

static method EPFNOSUPPORT : int ();

Calls Errno#WSAEPFNOSUPPORT method in Windows, or Errno#EPFNOSUPPORT method in other OSs, and returns its return value.

EAFNOSUPPORT

static method EAFNOSUPPORT : int ();

Calls Errno#WSAEAFNOSUPPORT method in Windows, or Errno#EAFNOSUPPORT method in other OSs, and returns its return value.

EADDRINUSE

static method EADDRINUSE : int ();

Calls Errno#WSAEADDRINUSE method in Windows, or Errno#EADDRINUSE method in other OSs, and returns its return value.

EADDRNOTAVAIL

static method EADDRNOTAVAIL : int ();

Calls Errno#WSAEADDRNOTAVAIL method in Windows, or Errno#EADDRNOTAVAIL method in other OSs, and returns its return value.

ENETDOWN

static method ENETDOWN : int ();

Calls Errno#WSAENETDOWN method in Windows, or Errno#ENETDOWN method in other OSs, and returns its return value.

ENETUNREACH

static method ENETUNREACH : int ();

Calls Errno#WSAENETUNREACH method in Windows, or Errno#ENETUNREACH method in other OSs, and returns its return value.

ENETRESET

static method ENETRESET : int ();

Calls Errno#WSAENETRESET method in Windows, or Errno#ENETRESET method in other OSs, and returns its return value.

ECONNABORTED

static method ECONNABORTED : int ();

Calls Errno#WSAECONNABORTED method in Windows, or Errno#ECONNABORTED method in other OSs, and returns its return value.

ECONNRESET

static method ECONNRESET : int ();

Calls Errno#WSAECONNRESET method in Windows, or Errno#ECONNRESET method in other OSs, and returns its return value.

ENOBUFS

static method ENOBUFS : int ();

Calls Errno#WSAENOBUFS method in Windows, or Errno#ENOBUFS method in other OSs, and returns its return value.

EISCONN

static method EISCONN : int ();

Calls Errno#WSAEISCONN method in Windows, or Errno#EISCONN method in other OSs, and returns its return value.

ENOTCONN

static method ENOTCONN : int ();

Calls Errno#WSAENOTCONN method in Windows, or Errno#ENOTCONN method in other OSs, and returns its return value.

ESHUTDOWN

static method ESHUTDOWN : int ();

Calls Errno#WSAESHUTDOWN method in Windows, or Errno#ESHUTDOWN method in other OSs, and returns its return value.

ETIMEDOUT

static method ETIMEDOUT : int ();

Calls Errno#WSAETIMEDOUT method in Windows, or Errno#ETIMEDOUT method in other OSs, and returns its return value.

ECONNREFUSED

static method ECONNREFUSED : int ();

Calls Errno#WSAECONNREFUSED method in Windows, or Errno#ECONNREFUSED method in other OSs, and returns its return value.

ELOOP

static method ELOOP : int ();

Calls Errno#WSAELOOP method in Windows, or Errno#ELOOP method in other OSs, and returns its return value.

ENAMETOOLONG

static method ENAMETOOLONG : int ();

Calls Errno#WSAENAMETOOLONG method in Windows, or Errno#ENAMETOOLONG method in other OSs, and returns its return value.

EHOSTDOWN

static method EHOSTDOWN : int ();

Calls Errno#WSAEHOSTDOWN method in Windows, or Errno#EHOSTDOWN method in other OSs, and returns its return value.

EHOSTUNREACH

static method EHOSTUNREACH : int ();

Calls Errno#WSAEHOSTUNREACH method in Windows, or Errno#EHOSTUNREACH method in other OSs, and returns its return value.

ENOTEMPTY

static method ENOTEMPTY : int ();

Calls Errno#WSAENOTEMPTY method in Windows, or Errno#ENOTEMPTY method in other OSs, and returns its return value.

EUSERS

static method EUSERS : int ();

Calls Errno#WSAEUSERS method in Windows, or Errno#EUSERS method in other OSs, and returns its return value.

EDQUOT

static method EDQUOT : int ();

Calls Errno#WSAEDQUOT method in Windows, or Errno#EDQUOT method in other OSs, and returns its return value.

ESTALE

static method ESTALE : int ();

Calls Errno#WSAESTALE method in Windows, or Errno#ESTALE method in other OSs, and returns its return value.

EREMOTE

static method EREMOTE : int ();

Calls Errno#WSAEREMOTE method in Windows, or Errno#EREMOTE method in other OSs, and returns its return value.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License