Network: First commit
Former-commit-id: ec8697acc51569f5043e4f70e4cf42f1c5dc487c
This commit is contained in:
61
include/Nazara/Network/Enums.hpp
Normal file
61
include/Nazara/Network/Enums.hpp
Normal file
@@ -0,0 +1,61 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Network module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_ENUMS_NETWORK_HPP
|
||||
#define NAZARA_ENUMS_NETWORK_HPP
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
enum NetProtocol
|
||||
{
|
||||
NetProtocol_Any,
|
||||
NetProtocol_IPv4,
|
||||
NetProtocol_IPv6,
|
||||
|
||||
NetProtocol_Max = NetProtocol_IPv6
|
||||
};
|
||||
|
||||
enum SocketError
|
||||
{
|
||||
SocketError_NoError,
|
||||
|
||||
SocketError_AddressNotAvailable, //< The address is already in use (when binding/listening)
|
||||
SocketError_ConnectionClosed, //< The connection has been closed
|
||||
SocketError_ConnectionRefused, //< The connection attempt was refused
|
||||
SocketError_DatagramSize, //< The datagram size is over the system limit
|
||||
SocketError_Internal, //< The error is coming from the engine
|
||||
SocketError_NetworkError, //< The network system has failed (maybe network is down)
|
||||
SocketError_NotInitialized, //< Nazara network has not been initialized
|
||||
SocketError_NotSupported, //< The operation is not supported (e.g. creating a bluetooth socket on a system without any bluetooth adaptater)
|
||||
SocketError_ResourceError, //< The operating system lacks the resources to proceed (e.g. memory/socket descriptor)
|
||||
SocketError_UnreachableHost, //< The host is not reachable
|
||||
SocketError_TimedOut, //< The operation timed out
|
||||
SocketError_Unknown, //< The last operation failed with an unlisted error code
|
||||
|
||||
SocketError_Max = SocketError_Unknown
|
||||
};
|
||||
|
||||
enum SocketState
|
||||
{
|
||||
SocketState_Bound, //< The socket is currently bound
|
||||
SocketState_Connecting, //< The socket is currently connecting
|
||||
SocketState_Connected, //< The socket is currently connected
|
||||
SocketState_NotConnected, //< The socket is not connected (or has been disconnected)
|
||||
|
||||
SocketState_Max = SocketState_NotConnected
|
||||
};
|
||||
|
||||
enum SocketType
|
||||
{
|
||||
SocketType_Raw,
|
||||
SocketType_TCP,
|
||||
SocketType_UDP,
|
||||
|
||||
SocketType_Max = SocketType_UDP
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_ENUMS_NETWORK_HPP
|
||||
Reference in New Issue
Block a user