logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gensio_set_callback, gensio_get_user_data, gensio_set_user_data - Set the event callback and user data

Description

gensio_set_callback sets the event  handler  and  data  for  the  gensio.   This  must  be  done  in  the
       GENSIO_ACC_EVENT_NEW_CONNECTION  event  from  a gensio_accepter before any other operation is done on the
       gensio.  The only exception is that gensio_close may be called with callbacks not set.  This function may
       be called again if the gensio cannot  generate  any  callbacks,  generally  after  it  has  been  closed.
       Otherwise race conditions may occur.

       gensio_set_user_data  Just  sets the user_data field in the gensio.  If this is called when the gensio is
       running, race conditions may occur.

       gensio_get_user_data Return the user data passed in with the gensio was created or  set  by  one  of  the
       above two functions.

Name

       gensio_set_callback,  gensio_get_user_data,  gensio_set_user_data  - Set the event callback and user data
       for a gensio

See Also

gensio(5), gensio_event(3), gensio_accepter_event(3)

                                                   23 Feb 2019                            gensio_set_callback(3)

Synopsis

#include<gensio/gensio.h>voidgensio_set_callback(structgensio*io,gensio_eventcb,void*user_data)voidgensio_set_user_data(structgensio*io,void*user_data);void*gensio_get_user_data(structgensio*io)

See Also