CAEN Utility  2.0.2
Utilities for CAEN projects
CAENSocketTypes.h File Reference

Definitions and types for CAENSocket.h. More...

#include <sys/socket.h>
#include <errno.h>
#include <types/CAENThreadTypes.h>
Include dependency graph for CAENSocketTypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  c_socket_t
 

Macros

#define c_socket_errno   errno
 Socket-related functions set the error into errno variable. Type is int. More...
 
#define c_socket_h_errno   h_errno
 Network database operations like gethostbyname() set the error into h_errno variable. Type is int. More...
 
#define c_socket_invalid   (-1)
 Functions like accept() return -1 in case of error. Type is c_socket_type_t. More...
 
#define c_socket_error   (c_ssize_t)(-1)
 Functions like send() and recv() return -1 in case of error. Type is c_ssize_t. More...
 
#define c_socket_max_ssize   (size_t)SSIZE_MAX
 Maximum value accepted as size by send() and recv(). Type is size_t. More...
 

Typedefs

typedef int c_socket_type_t
 Return type of socket(). More...
 
typedef socklen_t c_socklen_t
 See definition on Windows case. More...
 
typedef ssize_t c_ssize_t
 Return type of send() and recv(). More...
 

Enumerations

enum  c_Socket_ErrorCode_t {
  c_Socket_ErrorCode_Success = 0, c_Socket_ErrorCode_Argument = -1, c_Socket_ErrorCode_GenericError = -2, c_Socket_ErrorCode_Init = -3,
  c_Socket_ErrorCode_Bind = -4, c_Socket_ErrorCode_Listen = -5, c_Socket_ErrorCode_Connect = -6, c_Socket_ErrorCode_DNS = -7,
  c_Socket_ErrorCode_Send = -8, c_Socket_ErrorCode_Recv = -9, c_Socket_ErrorCode_SocketError = -10, c_Socket_ErrorCode_Mutex = -11
}
 

Detailed Description

Definitions and types for CAENSocket.h.

Author

Definition in file CAENSocketTypes.h.

Macro Definition Documentation

◆ c_socket_errno

#define c_socket_errno   errno

Socket-related functions set the error into errno variable. Type is int.

Definition at line 81 of file CAENSocketTypes.h.

◆ c_socket_h_errno

#define c_socket_h_errno   h_errno

Network database operations like gethostbyname() set the error into h_errno variable. Type is int.

Definition at line 82 of file CAENSocketTypes.h.

◆ c_socket_invalid

#define c_socket_invalid   (-1)

Functions like accept() return -1 in case of error. Type is c_socket_type_t.

Definition at line 83 of file CAENSocketTypes.h.

◆ c_socket_error

#define c_socket_error   (c_ssize_t)(-1)

Functions like send() and recv() return -1 in case of error. Type is c_ssize_t.

Definition at line 84 of file CAENSocketTypes.h.

◆ c_socket_max_ssize

#define c_socket_max_ssize   (size_t)SSIZE_MAX

Maximum value accepted as size by send() and recv(). Type is size_t.

Definition at line 85 of file CAENSocketTypes.h.

Typedef Documentation

◆ c_socket_type_t

typedef int c_socket_type_t

Return type of socket().

Definition at line 78 of file CAENSocketTypes.h.

◆ c_socklen_t

typedef socklen_t c_socklen_t

See definition on Windows case.

Definition at line 79 of file CAENSocketTypes.h.

◆ c_ssize_t

typedef ssize_t c_ssize_t

Return type of send() and recv().

Definition at line 80 of file CAENSocketTypes.h.

Enumeration Type Documentation

◆ c_Socket_ErrorCode_t

Enumerator
c_Socket_ErrorCode_Success 
c_Socket_ErrorCode_Argument 
c_Socket_ErrorCode_GenericError 
c_Socket_ErrorCode_Init 
c_Socket_ErrorCode_Bind 
c_Socket_ErrorCode_Listen 
c_Socket_ErrorCode_Connect 
c_Socket_ErrorCode_DNS 
c_Socket_ErrorCode_Send 
c_Socket_ErrorCode_Recv 
c_Socket_ErrorCode_SocketError 
c_Socket_ErrorCode_Mutex 

Definition at line 53 of file CAENSocketTypes.h.