1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-04-28 02:30:08 +00:00
ccnet-server/include/ccnet/ccnetrpc-transport.h
2016-08-19 13:54:34 +08:00

31 lines
990 B
C

#ifndef CCNETRPC_TRANPORT_H
#define CCNETRPC_TRANPORT_H
#include <ccnet.h>
typedef struct {
/* either session or pool will be set. */
CcnetClient *session;
CcnetClientPool *pool;
char *peer_id; /* NULL if local */
char *service;
} CcnetrpcTransportParam; /* this structure will be parsed to
* ccnet_transport_send ()
*/
typedef struct {
CcnetClient *session;
char *peer_id; /* NULL if local */
char *service;
} CcnetrpcAsyncTransportParam; /* this structure will be parsed to
* ccnet_async_transport_send ()
*/
char *ccnetrpc_transport_send (void *arg,
const gchar *fcall_str, size_t fcall_len, size_t *ret_len);
int ccnetrpc_async_transport_send (void *arg, gchar *fcall_str,
size_t fcall_len, void *rpc_priv);
#endif /* SEARPC_TRANPORT_H */