Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptconnectionserverseterror.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptconnectionserverseterror.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptconnectionserverseterror.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptconnectionserverseterror.html on line 8

PtConnectionServerSetError()

Set the error-handler function for the server-side of a connection

Synopsis:

PtConnectionServerErrorFunc_t *
    PtConnectionServerSetError(
        PtConnectionServer_t *connection,
        PtConnectionServerErrorFunc_t *func );

Library:

ph

Description:

This function sets up an error handling function for the server-side of a connection. The prototype of the handler is:

typedef int PtConnectionServerErrorFunc_t(
                PtConnectionServer_t *connection,
                int err,
                enum PtConnectionServerError where );

The where argument indicates where the error occurred:

Pt_CONNECTION_REPLY_FAILED
The MsgReply() to the client failed.
Pt_CONNECTION_REALLOC_RECEIVE
The realloc() failed to expand the receive buffer.
Pt_CONNECTION_SERVER_BROKEN
The client has died or closed its part of the connection.
Pt_CONNECTION_MSGREAD_FAILED
The MsgRead() from the client failed.

The error handler is called when certain errors occur; the handler can return Pt_CONTINUE to retry, or Pt_END to fail. The default error handler returns Pt_END.


Note: If your application has created its own channel without _NTO_CHF_COID_DISCONNECT and _NTO_CHF_DISCONNECT set, this mechanism won't work. For more information, see PhChannelAttach().

Returns:

A pointer to the previous error-handler function.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtConnectionClientSetError(), PtConnectionServerDestroy(), PtConnectionServerGetUserData(), PtConnectionServerSetUserData()

Connections in the Interprocess Communication chapter of the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pt/ptconnectionserverseterror.html on line 150

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pt/ptconnectionserverseterror.html on line 150