Concord - C Discord API library
A Discord API wrapper library written in C
concord-notifier.h File Reference

Notifier fds listening to pipe, this can be used to propagate events. More...

#include "concord-error.h"
Include dependency graph for concord-notifier.h:

Go to the source code of this file.

Functions

CCORDcode ccord_notifier_open (int pipe[2])
 Open notifier pipe. More...
 
void ccord_notifier_close (int pipe[2])
 Close notifier pipe. More...
 
void ccord_notifier_notify (int pipe[2])
 Notify fds listening to pipe. More...
 
_Bool ccord_notifier_is_notifying (int pipe[2])
 Whether or not pipe is currently notifying fds. More...
 
int ccord_notifier_listen (const int pipe[2])
 Receive a listener for pipe notifications. More...
 

Detailed Description

Notifier fds listening to pipe, this can be used to propagate events.

Author
Cogmasters

Function Documentation

◆ ccord_notifier_open()

CCORDcode ccord_notifier_open ( int  pipe[2])

Open notifier pipe.

Parameters
pipeThe pipe to open for emitting notifications
Returns
CCORDcode on success, CCORD_ERRNO on error

◆ ccord_notifier_close()

void ccord_notifier_close ( int  pipe[2])

Close notifier pipe.

Parameters
pipeThe pipe to close

◆ ccord_notifier_notify()

void ccord_notifier_notify ( int  pipe[2])

Notify fds listening to pipe.

Parameters
pipeThe pipe to notify

◆ ccord_notifier_is_notifying()

_Bool ccord_notifier_is_notifying ( int  pipe[2])

Whether or not pipe is currently notifying fds.

Parameters
pipeThe pipe to check
Returns
1 if notifying, 0 if not

◆ ccord_notifier_listen()

int ccord_notifier_listen ( const int  pipe[2])

Receive a listener for pipe notifications.

Parameters
pipeThe pipe to listen to
Returns
fd on success, -1 on error