PLCnext API Documentation 23.0.2.9
SocketError.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Core/Enum.hxx"
9
10namespace Arp { namespace System { namespace Commons { namespace Net
11{
12
14enum class SocketError
15{
17 None = 0,
19 Any = -1,
21 Interrupted = (10000 + 4), //WSAEINTR
23 InvalidArgument = (10000 + 22), //WSAEINVAL
25 TooManyOpenSockets = (10000 + 24), //WSAEMFILE
27 WouldBlock = (10000 + 35), //WSAEWOULDBLOCK
29 InProgress = (10000 + 36), //WSAEINPROGRESS
31 AlreadyInProgress = (10000 + 37), //WSAEALREADY
33 NotSocket = (10000 + 38), //WSAENOTSOCK
35 DestinationAddressRequired = (10000 + 39), //WSAEDESTADDRREQ
40 MessageSize = (10000 + 40), //WSAEMSGSIZE
45 ProtoType = (10000 + 41), //WSAEPROTOTYPE
47 ProtocolOption = (10000 + 42), //WSAENOPROTOOPT
49 ProtocolNotSupported = (10000 + 43), //WSAEPROTONOSUPPORT
51 SocketNotSupported = (10000 + 44), //WSAESOCKTNOSUPPORT
53 OperationNotSupported = (10000 + 45), //WSAEOPNOTSUPP
55 ProtocolFamilyNotSupported = (10000 + 46), //WSAEPFNOSUPPORT
57 AddressFamilyNotSupported = (10000 + 47), //WSAEAFNOSUPPORT
59 AddressAlreadyInUse = (10000 + 48), //WSAEADDRINUSE
61 AddressNotAvailable = (10000 + 49), //WSAEADDRNOTAVAIL
63 NetworkDown = (10000 + 50), //WSAENETDOWN
65 NetworkUnreachable = (10000 + 51), //WSAENETUNREACH
67 NetworkReset = (10000 + 52), //WSAENETRESET
69 ConnectionAborted = (10000 + 53), //WSAECONNABORTED
71 ConnectionReset = (10000 + 54), //WSAECONNRESET
73 NoBufferSpaceAvailable = (10000 + 55), //WSAENOBUFS
75 IsConnected = (10000 + 56), //WSAEISCONN
80 NotConnected = (10000 + 57), //WSAENOTCONN
85 Shutdown = (10000 + 58), //WSAESHUTDOWN
90 TimedOut = (10000 + 60), //WSAETIMEDOUT
92 ConnectionRefused = (10000 + 61), //WSAECONNREFUSED
94 HostDown = (10000 + 64), //WSAEHOSTDOWN
96 HostUnreachable = (10000 + 65), //WSAEHOSTUNREACH
98 ProcessLimit = (10000 + 67), //WSAEPROCLIM
103 SystemNotReady = (10000 + 91), //WSASYSNOTREADY
105 VersionNotSupported = (10000 + 92), //WSAVERNOTSUPPORTED
107 NotInitialized = (10000 + 93), //WSANOTINITIALISED
109 Disconnecting = (10000 + 101), //WSAEDISCON
111 HostNotFound = (10000 + 1001), //WSAHOST_NOT_FOUND
116 TryAgain = (10000 + 1002) //WSATRY_AGAIN
117};
118
120// global stream operators of enum SocketError for logging and parsing
121ARP_CXX_SYMBOL_EXPORT std::ostream& operator<<(std::ostream& os, SocketError value);
122ARP_CXX_SYMBOL_EXPORT std::istream& operator>>(std::istream& is, SocketError& value);
123
124}}}} // end of namespace Arp::System::Commons::Net
@ System
System components used by the System, Device, Plc or Io domains.
std::ostream & operator<<(std::ostream &os, const IpAddress &ipAddress)
The ostream operator is used for logging and string formatting.
Definition: IpAddress.hpp:107
std::istream & operator>>(std::istream &is, IpAddress &ipAddress)
The istream operator is used for string parsing.
Definition: IpAddress.hpp:114
SocketError
Possible error codes for socket operation results.
Definition: SocketError.hpp:15
Root namespace for the PLCnext API