Logo Search packages:      
Sourcecode: sofia-sip version File versions

SOFIAPUBFUN int su_root_register ( su_root_t self,
su_wait_t wait,
su_wakeup_f  callback,
su_wakeup_arg_t arg,
int  priority 

Register a su_wait_t object.

The function su_root_register() registers a su_wait_t object. The wait object, a callback function and a argument are stored to the root object. The callback function is called, when the wait object is signaled.

Please note if identical wait objects are inserted, only first one is ever signalled.

self pointer to root object
wait pointer to wait object
callback callback function pointer
arg argument given to callback function when it is invoked
priority relative priority of the wait object (0 is normal, 1 important, 2 realtime)
Nonzero index of the wait object, or -1 upon an error.

Definition at line 554 of file su_root.c.

References su_root_register().

Referenced by assign_socket(), forwarder_connected(), forwarder_empty(), forwarder_recv(), stun_obtain_shared_secret(), su_root_register(), tport_accept(), and tport_base_connect().

  assert(self && self->sur_port);

  if (!self || !self->sur_port)
    return -1;

  return su_port_register(self->sur_port, self, wait, callback, arg, priority);

Generated by  Doxygen 1.6.0   Back to index