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

str_to_gensio_accepter - Create a gensio accepter from a string

Description

str_to_gensio_accepter allocates a new gensio accepter stack based upon the given string str.str_to_gensio_accepter_child  allocates  a  new gensio accepter stack based upon the given string str and
       stacks it on top of the given child accepter.

       To allocate an accepter directly, use one of  gensio_terminal_acc_alloc  or  gensio_filter_acc_alloc.   A
       terminal  accepter  is  one  at  the  bottom of the stack.  The gdata parameter depends on the particular
       gensio.  For instance, for tcp it is a pointer to a gensio_addr structure.   For  stdio  it  is  an  argv
       array.  See gensio.5 under "Direct Allocation" for the particular gensio for what gdata is.

       A filter accepter is one that has a child.  You can use these two functions to allocate an accepter stack
       directly, not using a string format.

       The  cb  and  user_data  parameters  set a function that will be called when events come in on the gensio
       accepter.  user_data is unused by the gensio stack itself, it is there for the user and may  be  anything
       the user wishes.

       The new gensio accepter is returned in acc.  It will be in the shutdown state.

Name

       str_to_gensio_accepter - Create a gensio accepter from a string

Return Values

       Zero is returned on success, or a gensio error on failure.

See Also

gensio_acc_set_callback(3), gensio_err(3), gensio(5)

                                                   27 Feb 2019                         str_to_gensio_accepter(3)

Synopsis

#include<gensio/gensio.h>intstr_to_gensio_accepter(constchar*str,structgensio_os_funcs*o,gensio_accepter_eventcb,void*user_data,structgensio_accepter**acc);intstr_to_gensio_accepter_child(structgensio_accepter*child,constchar*str,structgensio_os_funcs*o,gensio_accepter_eventcb,void*user_data,structgensio_accepter**acc);intgensio_terminal_acc_alloc(constchar*gensiotype,constvoid*gdata,constchar*constargs[],structgensio_os_funcs*o,gensio_accepter_eventcb,void*user_data,structgensio_accepter**accepter);intgensio_filter_acc_alloc(constchar*gensiotype,structgensio_accepter*child,constchar*constargs[],structgensio_os_funcs*o,gensio_accepter_eventcb,void*user_data,structgensio_accepter**accepter);

See Also