![](/img/trans.png)
[英]How do I separate the RPC client and server so that the server runs on app engine and the client runs on my computer?
[英]How do I free the memory allocated in my RPC server?
我有一台RPC服務器,可將大量可變長度的數據傳輸到客戶端。 .x文件看起來像這樣
struct file
{
opaque data<>
};
在服務器例程中,我有
struct file *transfer_1_svc(...)
{
struct file;
file.data.data_val = malloc(...);
return &file;
}
我的問題是誰釋放了服務器例程中分配的數據?
這取決於您的服務器代碼。 如果使用rpcgen生成服務器存根,則可以使用xdr_free函數來釋放結果。 有關詳細信息,請查閱《 SunRPC開發人員指南》: https ://docs.oracle.com/cd/E19683-01/816-1435/rpcgenpguide-21470/index.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.