Creating notification groups

To create a notification group:
  1. Open the .notify object in the root of the PPS filesystem.
  2. Read the .notify object; the first read of this file returns a short string (less than 16 characters) with the name of the group to which other file descriptors should associate themselves.

To associate a file descriptor with a group, on an open, specify the pathname open option ?notify=group:value, where:

  • group is the string returned by the first read from the .notify file
  • value is any arbitrary string; a subscriber will use this string to determine which objects bound to the notification group have data available for reading
Note:
The returned notification group string has a trailing linefeed character that you must remove before using the string.
Page updated: