UT_Socket Class Reference

#include <UT_IPC.h>

Inheritance diagram for UT_Socket:

UT_Transport UT_InetSocket UT_UnixSocket UT_InetDatagram UT_InetStream UT_UnixStream

List of all members.

Public Types

enum  UT_SocketSex { UT_Unknown, UT_Client, UT_Server }
enum  UT_AddressFamily { UT_AfUnix = AF_UNIX, UT_AfInet = AF_INET }
enum  UT_SocketType {
  UT_Stream = SOCK_STREAM, UT_Datagram = SOCK_DGRAM, UT_Raw = SOCK_RAW, UT_RDM = SOCK_RDM,
  UT_SeqPacket = SOCK_SEQPACKET
}
enum  UT_MsgSendFlags { UT_MsgSendNoFlags = 0, UT_MsgSendDontRoute = MSG_DONTROUTE, UT_MsgSendOob = MSG_OOB, UT_MsgSendDontRouteOob = MSG_OOB|MSG_DONTROUTE }
enum  UT_MsgReceiveFlags { UT_MsgReceiveNoFlags = 0, UT_MsgReceivePeek = MSG_PEEK, UT_MsgReceiveOob = MSG_OOB, UT_MsgReceivePeekOob = MSG_OOB|MSG_PEEK }
enum  UT_FlagOption { UT_Off = 0, UT_On = 1 }
enum  UT_SocketLevelOption {
  UT_Broadcast = SO_BROADCAST, UT_Debug = SO_DEBUG, UT_DontRoute = SO_DONTROUTE, UT_KeepAlive = SO_KEEPALIVE,
  UT_OOBInline = SO_OOBINLINE, UT_ReuseAddr = SO_REUSEADDR, UT_UseLoopBack = SO_USELOOPBACK
}

Public Member Functions

 UT_Socket (UT_AddressFamily af, UT_SocketType st)
 ~UT_Socket ()
 UT_Socket (UT_AddressFamily af)
 UT_Socket (UT_SocketType st)
virtual int close ()
int listen (int)
int recv (char *, int, UT_MsgReceiveFlags=UT_MsgReceiveNoFlags)
int recvfrom (char *, int, struct sockaddr *, int &, UT_MsgReceiveFlags=UT_MsgReceiveNoFlags)
int send (const char *, int, UT_MsgSendFlags=UT_MsgSendNoFlags)
int sendto (const char *, int, const struct sockaddr *, int, UT_MsgSendFlags=UT_MsgSendNoFlags)
int recvmsg (struct msghdr *, UT_MsgReceiveFlags=UT_MsgReceiveNoFlags)
int sendmsg (struct msghdr *, UT_MsgSendFlags=UT_MsgSendNoFlags)
void linger ()
int setOption (UT_SocketLevelOption slo, UT_FlagOption fo)
int getOption (UT_SocketLevelOption slo, UT_FlagOption &fo)
UT_AddressFamily address_family ()
UT_SocketType socket_type ()
UT_SocketSex socket_sex ()
int socket_protocol ()
int isclient ()
int isserver ()
virtual int socket ()

Protected Member Functions

virtual void shutdown (UT_ShutDownType)
int accept (struct sockaddr *sa, int &len)
int bind (const struct sockaddr *, int)
int connect (const struct sockaddr *, int)
int getpeername (struct sockaddr *, int &len)
int getsockname (struct sockaddr *, int &len)
int getsockopt (int, int, char *, int *)
int setsockopt (int, int, const char *, int)
int check_syscall (int state, const char *mess)
int syscall (int state, const char *mess)

Protected Attributes

UT_SocketType type
UT_AddressFamily family
int protocol
UT_SocketSex sex


Detailed Description

Definition at line 170 of file UT_IPC.h.


Member Enumeration Documentation

Enumerator:
UT_AfUnix 
UT_AfInet 

Definition at line 180 of file UT_IPC.h.

Enumerator:
UT_Off 
UT_On 

Definition at line 205 of file UT_IPC.h.

Enumerator:
UT_MsgReceiveNoFlags 
UT_MsgReceivePeek 
UT_MsgReceiveOob 
UT_MsgReceivePeekOob 

Definition at line 198 of file UT_IPC.h.

Enumerator:
UT_MsgSendNoFlags 
UT_MsgSendDontRoute 
UT_MsgSendOob 
UT_MsgSendDontRouteOob 

Definition at line 192 of file UT_IPC.h.

Enumerator:
UT_Broadcast 
UT_Debug 
UT_DontRoute 
UT_KeepAlive 
UT_OOBInline 
UT_ReuseAddr 
UT_UseLoopBack 

Definition at line 209 of file UT_IPC.h.

Enumerator:
UT_Unknown 
UT_Client 
UT_Server 

Definition at line 175 of file UT_IPC.h.

Enumerator:
UT_Stream 
UT_Datagram 
UT_Raw 
UT_RDM 
UT_SeqPacket 

Definition at line 184 of file UT_IPC.h.


Constructor & Destructor Documentation

UT_Socket::UT_Socket ( UT_AddressFamily  af,
UT_SocketType  st 
)

UT_Socket::~UT_Socket (  ) 

UT_Socket::UT_Socket ( UT_AddressFamily  af  ) 

UT_Socket::UT_Socket ( UT_SocketType  st  ) 


Member Function Documentation

int UT_Socket::accept ( struct sockaddr *  sa,
int &  len 
) [protected]

UT_AddressFamily UT_Socket::address_family (  )  [inline]

Definition at line 244 of file UT_IPC.h.

int UT_Socket::bind ( const struct sockaddr *  ,
int   
) [protected]

int UT_Socket::check_syscall ( int  state,
const char *  mess 
) [protected]

virtual int UT_Socket::close (  )  [virtual]

Reimplemented from UT_Transport.

Reimplemented in UT_UnixSocket, and UT_UnixStream.

int UT_Socket::connect ( const struct sockaddr *  ,
int   
) [protected]

int UT_Socket::getOption ( UT_SocketLevelOption  slo,
UT_FlagOption fo 
)

int UT_Socket::getpeername ( struct sockaddr *  ,
int &  len 
) [protected]

int UT_Socket::getsockname ( struct sockaddr *  ,
int &  len 
) [protected]

int UT_Socket::getsockopt ( int  ,
int  ,
char *  ,
int *   
) [protected]

int UT_Socket::isclient (  )  [inline]

Definition at line 248 of file UT_IPC.h.

int UT_Socket::isserver (  )  [inline]

Definition at line 249 of file UT_IPC.h.

void UT_Socket::linger (  ) 

int UT_Socket::listen ( int   ) 

int UT_Socket::recv ( char *  ,
int  ,
UT_MsgReceiveFlags  = UT_MsgReceiveNoFlags 
)

int UT_Socket::recvfrom ( char *  ,
int  ,
struct sockaddr *  ,
int &  ,
UT_MsgReceiveFlags  = UT_MsgReceiveNoFlags 
)

int UT_Socket::recvmsg ( struct msghdr *  ,
UT_MsgReceiveFlags  = UT_MsgReceiveNoFlags 
)

int UT_Socket::send ( const char *  ,
int  ,
UT_MsgSendFlags  = UT_MsgSendNoFlags 
)

int UT_Socket::sendmsg ( struct msghdr *  ,
UT_MsgSendFlags  = UT_MsgSendNoFlags 
)

int UT_Socket::sendto ( const char *  ,
int  ,
const struct sockaddr *  ,
int  ,
UT_MsgSendFlags  = UT_MsgSendNoFlags 
)

int UT_Socket::setOption ( UT_SocketLevelOption  slo,
UT_FlagOption  fo 
)

int UT_Socket::setsockopt ( int  ,
int  ,
const char *  ,
int   
) [protected]

virtual void UT_Socket::shutdown ( UT_ShutDownType   )  [protected, virtual]

Implements UT_Transport.

virtual int UT_Socket::socket (  )  [virtual]

Reimplemented in UT_InetDatagram.

int UT_Socket::socket_protocol (  )  [inline]

Definition at line 247 of file UT_IPC.h.

UT_SocketSex UT_Socket::socket_sex (  )  [inline]

Definition at line 246 of file UT_IPC.h.

UT_SocketType UT_Socket::socket_type (  )  [inline]

Definition at line 245 of file UT_IPC.h.

int UT_Socket::syscall ( int  state,
const char *  mess 
) [protected]


Member Data Documentation

Definition at line 267 of file UT_IPC.h.

int UT_Socket::protocol [protected]

Definition at line 268 of file UT_IPC.h.

Definition at line 269 of file UT_IPC.h.

Definition at line 266 of file UT_IPC.h.


The documentation for this class was generated from the following file:

Generated on Fri May 25 00:10:54 2012 for HDK by  doxygen 1.5.9