Send a notification event to the client
int PtConnectionNotify( PtConnectionServer_t *connection, unsigned long type, void const *message, unsigned length, unsigned flags );
ph
This function sends an event notification to the client. The possible values of flags include:
If the server sets both Pt_CONNECTION_NOTIFY_RESIZE and Pt_CONNECTION_NOTIFY_NOFLUSH, it might run out of memory if the client is slow or unresponsive. If you do set both bits, make sure that your protocol prevents you from sending too many notifications. (For example, require the client to send an acknowledgment for each received notification, and don't send a new notification unless the previous one has been acknowledged.)
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtConnectionAddEventHandlers(), PtConnectionAddMsgHandlers(), PtConnectionFlush(), PtConnectionReply(), PtConnectionReplymx(), PtConnectionResizeEventBuffer(), PtConnectionSend(), PtConnectionSendmx()
“Connections” in the Interprocess Communication chapter of the Photon Programmer's Guide