Poster of Linux kernelThe best gift for a Linux geek
ost::UnixSocket

ost::UnixSocket

Section: C Library Functions (3) Updated: 16 Feb 2010
Local index Up
 

NAME

ost::UnixSocket -

Unix domain sockets are used for stream based connected sessions between processes on the same machine.

 

SYNOPSIS


#include <unix.h>

Inherits ost::Socket.  

Public Member Functions


UnixSocket (const char *pathname, int backlog=5)
A Unix domain 'server' is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests.
bool isPendingConnection (timeout_t timeout=~((timeout_t) 0))
Used to wait for pending connection requests.
virtual ~UnixSocket ()
Use base socket handler for ending this socket.  

Protected Member Functions


void close (void)
 

Protected Attributes


char * path
 

Friends


class UnixStream

class SocketPort

class unixstream
 

Detailed Description

Unix domain sockets are used for stream based connected sessions between processes on the same machine.

An implicit and unique UnixSocket object exists in Common C++ to represent a bound Unix domain socket acting as a 'server' for receiving connection requests. This class is not part of UnixStream because such objects normally perform no physical I/O (read or write operations) other than to specify a listen backlog queue and perform 'accept' operations for pending connections.

Author:

Alex Pavloff <alex@pavloff.net> bound server for Unix domain streams and sessions.

 

Constructor & Destructor Documentation

 

ost::UnixSocket::UnixSocket (const char * pathname, int backlog = 5)

A Unix domain 'server' is created as a Unix domain socket that is bound to a pathname and that has a backlog queue to listen for connection requests. If the server cannot be created, an exception is thrown.

Parameters:

pathname pathname to socket file
backlog size of connection request queue.

 

virtual ost::UnixSocket::~UnixSocket () [virtual]

Use base socket handler for ending this socket.  

Member Function Documentation

 

void ost::UnixSocket::close (void) [protected]

 

bool ost::UnixSocket::isPendingConnection (timeout_t timeout = ~((timeout_t) 0)) [inline]

Used to wait for pending connection requests. not const -- jfc

References ost::Socket::isPending(), and ost::Socket::pendingInput.  

Friends And Related Function Documentation

 

friend class SocketPort [friend]

 

friend class unixstream [friend]

 

friend class UnixStream [friend]

 

Member Data Documentation

 

char* ost::UnixSocket::path [protected]

 

Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Protected Member Functions
Protected Attributes
Friends
Detailed Description
Constructor & Destructor Documentation
ost::UnixSocket::UnixSocket (const char * pathname, int backlog = 5)
virtual ost::UnixSocket::~UnixSocket () [virtual]
Member Function Documentation
void ost::UnixSocket::close (void) [protected]
bool ost::UnixSocket::isPendingConnection (timeout_t timeout = ~((timeout_t) 0)) [inline]
Friends And Related Function Documentation
friend class SocketPort [friend]
friend class unixstream [friend]
friend class UnixStream [friend]
Member Data Documentation
char* ost::UnixSocket::path [protected]
Author

This document was created by man2html, using the manual pages.
Time: 21:51:53 GMT, April 16, 2011