logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ost::UnixSession - The Unix domain session is used to primarily to represent a client connection that can

Author

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

GNU CommonC++                                    Sun Dec 27 2020                             ost::UnixSession(3)

Constructor & Destructor Documentation

ost::UnixSession::UnixSession(constchar*pathname,intsize=512,intpri=0,intstack=0)
       Create a Unix domain socket that will be connected to a local server server and that will execute under
       it's own thread.

       Parameterspathname path to socket
           size of streaming buffer.
           pri execution priority relative to parent.
           stack allocation needed on some platforms.

   ost::UnixSession::UnixSession(UnixSocket&server,intsize=512,intpri=0,intstack=0)
       Create a Unix domain socket from a bound Unix domain server by accepting a pending connection from that
       server and execute a thread for the accepted connection.

       Parametersserver unix domain socket to accept a connection from.
           size of streaming buffer.
           pri execution priority relative to parent.
           stack allocation needed on some platforms.

   virtualost::UnixSession::~UnixSession()[virtual]
       Virtual destructor.

Detailed Description

       The Unix domain session is used to primarily to represent a client connection that can be managed on a
       separate thread.

       The Unix domain session also supports a non-blocking connection scheme which prevents blocking during the
       constructor and moving the process of completing a connection into the thread that executes for the
       session.

       Author
           Alex Pavloff alex@pavloff.net

       Threaded streamable unix domain socket with non-blocking constructor.

Member Function Documentation

voidost::UnixSession::initial(void)[protected],[virtual]
       The initial method is used to esablish a connection when delayed completion is used. This assures the
       constructor terminates without having to wait for a connection request to complete.

       Reimplemented from ost::Thread.

   intost::UnixSession::waitConnection(timeout_ttimeout=TIMEOUT_INF)[protected]
       Normally called during the thread Initial() method by default, this will wait for the socket connection
       to complete when connecting to a remote socket. One might wish to use setCompletion() to change the
       socket back to blocking I/O calls after the connection completes. To implement the session one must
       create a derived class which implements Run().

       Returns
           0 if successful, -1 if timed out.

       Parameterstimeout to wait for completion in milliseconds.

Name

       ost::UnixSession - The Unix domain session is used to primarily to represent a client connection that can
       be managed on a separate thread.

Synopsis

       #include <unix.h>

       Inherits ost::Thread, and ost::UnixStream.

   PublicMemberFunctionsUnixSession (const char *pathname, int size=512, int pri=0, int stack=0)
           Create a Unix domain socket that will be connected to a local server server and that will execute
           under it's own thread.
       UnixSession (UnixSocket &server, int size=512, int pri=0, int stack=0)
           Create a Unix domain socket from a bound Unix domain server by accepting a pending connection from
           that server and execute a thread for the accepted connection.
       virtual ~UnixSession ()
           Virtual destructor.

   ProtectedMemberFunctions
       int waitConnection (timeout_ttimeout=TIMEOUT_INF)
           Normally called during the thread Initial() method by default, this will wait for the socket
           connection to complete when connecting to a remote socket.
       void initial (void)
           The initial method is used to esablish a connection when delayed completion is used.

   AdditionalInheritedMembers

See Also