2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Ux::Socket Class Reference
[C++ Wrapper for Standard UNIX Functions]

Inheritance diagram for Ux::Socket:

Ux::File Ux::Base List of all members.

Detailed Description

Definition at line 140 of file uxsocket.hpp.

Public Member Functions

 Socket (int f=-1, const char *p=NULL, ssize_t s=-1)
 Socket (const char *p, ssize_t s=-1)
Socket accept (SockAddr *sa=NULL)
void connect (const SockAddr &sa)
void bind (const SockAddr &sa)
void getpeername (SockAddr &sa)
void getsockname (SockAddr &sa)
void getsockopt (int level, int option, void *value, socklen_t &value_len)
void listen (int backlog=SOMAXCONN)
ssize_t recv (void *buffer, size_t length, int flags)
ssize_t recvfrom (void *buffer, size_t length, int flags, struct sockaddr *sa, socklen_t *sa_len)
ssize_t recvmsg (struct msghdr *message, int flags)
ssize_t send (const void *data, size_t length, int flags)
ssize_t sendmsg (const struct msghdr *message, int flags)
ssize_t sendto (const void *message, size_t length, int flags, const struct sockaddr *sa, socklen_t sa_len)
void setsockopt (int level, int option, const void *value, socklen_t value_len)
void shutdown (int how)
bool sockatmark (void)
void socket (int domain=AF_UNIX, int type=SOCK_STREAM, int protocol=0)

Static Public Member Functions

void socketpair (Socket sv[2], int domain=AF_UNIX, int type=SOCK_STREAM, int protocol=0)


Constructor & Destructor Documentation

Ux::Socket::Socket int  f = -1,
const char *  p = NULL,
ssize_t  s = -1
[inline]
 

Definition at line 143 of file uxsocket.hpp.

Referenced by accept().

Ux::Socket::Socket const char *  p,
ssize_t  s = -1
[inline]
 

Definition at line 146 of file uxsocket.hpp.


Member Function Documentation

Socket Socket::accept SockAddr sa = NULL  ) 
 

Calls accept.

Definition at line 209 of file uxsocket.cpp.

References errno, Ux::File::fd, Ux::SockAddr::get_addr(), Ux::SockAddr::get_len_ptr(), and Socket().

void Socket::bind const SockAddr sa  ) 
 

Calls bind.

Definition at line 191 of file uxsocket.cpp.

References errno, Ux::File::fd, Ux::SockAddr::get_addr(), and Ux::SockAddr::get_len().

void Socket::connect const SockAddr sa  ) 
 

Calls connect.

Definition at line 225 of file uxsocket.cpp.

References errno, Ux::File::fd, Ux::SockAddr::get_addr(), and Ux::SockAddr::get_len().

void Socket::getpeername SockAddr sa  ) 
 

Calls getpeername.

Definition at line 325 of file uxsocket.cpp.

References errno, Ux::File::fd, Ux::SockAddr::get_addr(), and Ux::SockAddr::get_len_ptr().

void Socket::getsockname SockAddr sa  ) 
 

Calls getsockname.

Definition at line 334 of file uxsocket.cpp.

References errno, Ux::File::fd, Ux::SockAddr::get_addr(), and Ux::SockAddr::get_len_ptr().

void Socket::getsockopt int  level,
int  option,
void *  value,
socklen_t &  value_len
 

Calls getsockopt.

Definition at line 243 of file uxsocket.cpp.

References errno, and Ux::File::fd.

void Socket::listen int  backlog = SOMAXCONN  ) 
 

Calls listen.

Definition at line 200 of file uxsocket.cpp.

References errno, and Ux::File::fd.

ssize_t Socket::recv void *  buffer,
size_t  length,
int  flags
 

Calls recv.

Definition at line 314 of file uxsocket.cpp.

References errno, and Ux::File::fd.

ssize_t Socket::recvfrom void *  buffer,
size_t  length,
int  flags,
struct sockaddr *  sa,
socklen_t *  sa_len
 

Calls recvfrom.

Definition at line 265 of file uxsocket.cpp.

References errno, and Ux::File::fd.

ssize_t Socket::recvmsg struct msghdr *  message,
int  flags
 

Calls recvmsg.

Definition at line 290 of file uxsocket.cpp.

References errno, and Ux::File::fd.

ssize_t Socket::send const void *  data,
size_t  length,
int  flags
 

Calls send.

Definition at line 302 of file uxsocket.cpp.

References errno, and Ux::File::fd.

ssize_t Socket::sendmsg const struct msghdr *  message,
int  flags
 

Calls sendmsg.

Definition at line 278 of file uxsocket.cpp.

References errno, and Ux::File::fd.

ssize_t Socket::sendto const void *  message,
size_t  length,
int  flags,
const struct sockaddr *  sa,
socklen_t  sa_len
 

Calls sendto.

Definition at line 252 of file uxsocket.cpp.

References errno, and Ux::File::fd.

void Socket::setsockopt int  level,
int  option,
const void *  value,
socklen_t  value_len
 

Calls setsockopt.

Definition at line 234 of file uxsocket.cpp.

References errno, and Ux::File::fd.

void Socket::shutdown int  how  ) 
 

Calls shutdown.

Definition at line 356 of file uxsocket.cpp.

References errno, and Ux::File::fd.

bool Socket::sockatmark void   ) 
 

Calls sockatmark; return converted to bool.

Definition at line 365 of file uxsocket.cpp.

References errno, and Ux::File::fd.

void Socket::socket int  domain = AF_UNIX,
int  type = SOCK_STREAM,
int  protocol = 0
 

Calls socket.

Definition at line 182 of file uxsocket.cpp.

References errno, and Ux::File::fd.

void Socket::socketpair Socket  sv[2],
int  domain = AF_UNIX,
int  type = SOCK_STREAM,
int  protocol = 0
[static]
 

Calls socketpair. Arguments rearranged so array comes first, which allows default arguments.

Definition at line 343 of file uxsocket.cpp.

References errno, and Ux::File::set().


The documentation for this class was generated from the following files:
Generated on Fri Apr 23 10:57:18 2004 for AUP2 Example Source by doxygen 1.3.1