Set the error-handler function for the client-side of a connection
PtConnectionClientErrorFunc_t * PtConnectionClientSetError( PtConnectionClient_t *connection, PtConnectionClientErrorFunc_t *func );
ph
This function sets up an error handling function for the client-side of a connection. The prototype of the handler is:
typedef int PtConnectionClientErrorFunc_t( PtConnectionClient_t *connection, int err, enum PtConnectionClientError where );
The where argument indicates where the error occurred:
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.
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(). |
A pointer to the previous error-handler function.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtConnectionClientDestroy(), PtConnectionClientGetUserData(), PtConnectionClientSetUserData(), PtConnectionServerSetError()
“Connections” in the Interprocess Communication chapter of the Photon Programmer's Guide