# rpc **Repository Path**: bbbbbruce/rpc ## Basic Information - **Project Name**: rpc - **Description**: easy remote procedure call framwork - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-05-04 - **Last Updated**: 2024-10-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## RPC ### Protocol Description for client, it will send a dataframe like | type | name_length | name | rpc_data | + type will be REQ + name_length is the length of `name` + name is the calling function name + rpc_data is the argument the dataframe above wants to call a function in server side, or calling `rpc_find` or like | type | + type will be CLOSE the dataframe above wants to close the tcp connection for server, it will send a dataframe like | type | rpc_data | + type will be RESP + rpc_data is the result the dataframe above is going to send a response back to client of their function call or like | type | + type will be ERROR the dataframe above indicates the server occurs an error when processing the function call ### Overview Each time the client sends an RPC request through a TCP connection, the server forks a child process to handle the request for each TCP connection received, and the parent process is only responsible for continuously receiving TCP connections. ### How to use + for server + rpc_init_server(port) + rpc_register() + rpc_serve_all() + for client + rpc_init_client(ipv6 address, port) + rpc_find() + rpc_call()