1ic_c_protocol(3)              C Library Functions             ic_c_protocol(3)
2
3
4

NAME

6       ic_c_protocol - IC C Protocol Functions
7

DESCRIPTION

9       This  manual  page  lists  some  of  the  functions of the IC C runtime
10       library that are used internally for the IC protocol.
11
12       The listed functions are used internally  by  generated  C  client  and
13       server  code.  They are documented here for the advanced user that want
14       to replace the default protocol (Erlang distribution +  gen_server)  by
15       his  own protocol, For each set of client or sever functions below with
16       prefix oe, the user has to implement his  own  set  of  functions,  the
17       names  of  which are obtained by replacing the oe prefix by Prefix. The
18       Prefix has to be set with the option {user_protocol, Prefix} at compile
19       time.
20
21       The  following terminology is used (reflected in names of functions): a
22       notification is a message send from client to server, without any reply
23       back (i.e. a oneway operation); a request is a message sent from client
24       to server, and where a reply message is sent back from  the  server  to
25       the client.
26
27       In order to understand how the functions work and what they do the user
28       must study their implementation in the IC C  library  (source  file  is
29       ic.c),  and  also  consider how they are used in the C code of ordinary
30       generated client stubs or server skeletons.
31

CLIENT PROTOCOL FUNCTIONS

33       The following functions are used internally by generated C client code.
34

EXPORTS

36       int oe_prepare_notification_encoding(CORBA_Environment *env)
37
38              The result of this function is the beginning of a binary  of  in
39              external format of the tuple {'$gen_cast', X} where X is not yet
40              filled in.
41
42              In generated client code this function is the first to be called
43              in the encoding function for each oneway operation.
44
45       int oe_send_notification(CORBA_Environment *env)
46       int   oe_send_notification_tmo(CORBA_Environment  *env,   unsigned  int
47       send_ms)
48
49              Sends a client notification to a server according to the  Erlang
50              distribution + gen_server protocol.
51
52              The send_ms parameter specified a timeout in milliseconds.
53
54       int oe_prepare_request_encoding(CORBA_Environment *env)
55
56              The  result of this function is the beginning of a binary in the
57              external format of the tuple {'$gen_call', {Pid, Ref}, X}  where
58              X is not yet filled in.
59
60              In generated client code this function is the first to be called
61              in the encoding function for each twoway operation.
62
63       int oe_send_request_and_receive_reply(CORBA_Environment *env)
64       int    oe_send_request_and_receive_reply_tmo(CORBA_Environment    *env,
65       unsigned int send_ms, unsigned int recv_ms)
66
67              Sends  a  client request and receives the reply according to the
68              Erlang distribution + gen_server protocol. This  function  calls
69              the  oe_prepare_reply_decoding  function  in order to obtain the
70              gen_server reply.
71
72              send_ms and recv_ms  specify  timeouts  for  send  and  receive,
73              respectively, in milliseconds.
74
75       int oe_prepare_reply_decoding(CORBA_Environment *env)
76
77              Decodes  the binary version of the tuple {Ref, X}, where X is to
78              be decoded later by the specific client decoding function.
79

SERVER PROTOCOL FUNCTIONS

81       The following functions are used internally by generated C server code.
82

EXPORTS

84       int oe_prepare_request_decoding(CORBA_Environment *env)
85
86              Decodes the binary version of the tuple {'$gen_cast', Op} (Op an
87              atom),  or  the  tuple  {'$gen_cast',  {Op, X}}, where Op is the
88              operation name, and where X is to be decoded later by  the  spe‐
89              cific operation decoding function; or
90
91              decodes  the  binary  version  of  the tuple {'$gen_call', {Pid,
92              Ref}, Op} (Op an atom), or the tuple {'$gen_call',  {Pid,  Ref},
93              {Op, X}}, where Op> is the operation name, and X is to be decode
94              later by the specific operation decoding function.
95
96       int oe_prepare_reply_encoding(CORBA_Environment *env)
97
98              Encodes the  beginning  of  the  binary  version  of  the  tuple
99              {{Ref,X},  where  X  is  to  be filled in by the specific server
100              encoding function.
101

SEE ALSO

103       ic(3), ic_clib(3), IC Protocol
104
105
106
107Ericsson AB                        ic 4.5.2                   ic_c_protocol(3)
Impressum