41 #ifndef _networksocket_h
42 #define _networksocket_h
44 #include "Network/networkenumerations.h"
46 #include "Network/packet.h"
47 #include "Network/systemaddress.h"
136 class PlatformSocket;
175 virtual SocketStatus GetStatus() const = 0;// */
190 Boole GetBlocking()
const;
196 Integer GetNumBytesAvailable()
const;
199 Boole IsInvalid()
const;
224 Integer Send(
const void* Buffer,
const UInt32 BufSize)
const;
238 Integer ReceivePeek(
void* Buffer,
const UInt32 BufSize)
const;
253 virtual void SetNumUnicastHops(
const Integer Hops) = 0;
256 virtual Integer GetNumUnicastHops()
const = 0;
260 void SetReuseAddress(
const Boole Reuse);
263 Boole GetReuseAddress()
const;
266 void SetDontRoute(
const Boole Route);
269 Boole GetDontRoute()
const;
272 void SetDebugInformation(
const Boole Debug);
275 Boole GetDebugInformation()
const;
282 void SetSendBufferSize(
const Integer Size);
285 Integer GetSendBufferSize()
const;
291 void SetReceiveBufferSize(
const Integer Size);
294 Integer GetReceiveBufferSize()
const;
304 static void ThrowError(
const Integer ErrorCode);
306 static void ThrowLastError();
const Integer SE_InvalidProtoType
The specified protocol is of the wrong type for the socket type specified. This error occurs on socke...
const Integer SE_NotConnected
The socket is not connected. Operations requiring a connection cannot be performed.
const Integer SE_AFNotSupported
The system does not have the specified address family installed or configured. This is mostly interch...
PlatformSocket * InternalSocket
A pointer to the internal system socket.
const Integer SE_Interrupted
The thread or process running a socket operation was terminated prematurely.
const Integer SE_DestAddrReq
Specifying a destination address is required for the erroring operation. This often applies to a sock...
This is a basic socket interface for the transmission and retrieval of packets.
bool Boole
Generally acts a single bit, true or false.
const Integer SE_AlreadyConnected
The socket is already connected. Additional connections are not supported.
const Integer SE_Unknown
An unknown error occured. This is for when our errors error.
NetworkLayerProtocol
This is an enum listing for recognized protocols on Layer 3 of the OSI model.
const Integer SE_ConnectionDropped
The connection was dropped. Usually occurs after keep-alive detected a failure while an operation was...
int Integer
A datatype used to represent any integer close to.
const Integer SE_ConnectionTimeout
The connection timed out. The connect failed because the remote host didn't respond within the timeou...
const Integer SE_Uninitialized
The OS modules for networking haven't been started.
const Integer SE_InvalidParam
An argument/parameter was provided to a socket operation.
const Integer SE_NetworkDown
The operation encountered a dead network. This could be because of a failure of the network system...
const Integer SE_HostUnreachable
No route to the specified host could be found.
const Integer SE_ProtoNotSupported
The system does not have the specified protocol installed or configured.
const Integer SE_MessageSize
The message to be sent through a socket is too large. The buffer provided to be sent on a datagram so...
uint16_t UInt16
An 16-bit unsigned integer.
const Integer SE_NowInProgress
The socket is non-blocking and the operation cannot be completed immediately, but is now in progress...
const Integer SE_NoBufferSpace
Either the OS lacked sufficient buffer space or the queue was full.
TransportLayerProtocol
This is an enum listing for recognized protocols on Layer 4 of the OSI model.
const Integer SE_NetworkNotReady
The OS modules needed for networking are unavailable.
uint32_t UInt32
An 32-bit unsigned integer.
const Integer SE_WouldBlock
A resource is temporarily unavailable. This can be returned from operations on non-blocking sockets t...
const Integer SE_InvalidOperation
The operation requested is not supported for the socket provided. For example "accept" being called o...
const Integer SE_SocketNotSupported
Either the specified socket type does not exist or support for the specified socket type with the spe...
const Integer SE_InvalidProtoOpt
An invalid option level was specified for a call setting or getting a socket option.
const Integer SE_ConnectionRefused
The connection was refused. The remote host doesn't like you. Probably because you smell funny...
const Integer SE_NonSocket
Attempting to perform a socket operation on a handle that does not belong to a valid socket...
const Integer SE_AddrNotAvail
The address specified is not valid in the current context.
const Integer SE_NetworkUnreachable
The operation could not find a valid route to the remote host specified.
const Integer SE_InvalidAddr
The address data provided was faulty or invalid.
const Integer SE_IOLimit
Too many IO handles (Files and sockets share a pool) are open. This may be a global, process, or thread limit depending on platform.
const Integer SE_AddrInUse
The address specified for binding is already in use by another socket.
const Integer SE_AlreadyInProgress
The socket is non-blocking and an operation is already in progress.
const Integer SE_AccessDenied
Insufficient access permissions to perform specified socket operation.
const Integer SE_HostIsDown
The operation failed because the remote host is down or doesn't exist.
The bulk of the engine components go in this namspace.
const Integer SE_ConnectionReset
The connection was reset/closed by the remote host. This can also occur if keep-alive detected a fail...
SocketShutdown
This is a small enum used for socket shutdown parameters.
const Integer SE_SocketShutdown
The socket has already been shut down and operations cannot be performed on it.
const Integer SE_ConnectionAborted
The connection was aborted by software on the local host.
A simple class that stores a complete set of information for establishing connections.
const Integer SE_PFNotSupported
The system does not have the specified protocol family installed or configured. This is mostly interc...