| 184 | } |
| 185 | |
| 186 | void ClientCodeRender::GenerateStubFunc(const SyntaxTree *const stree, const SyntaxFunc *const func, |
| 187 | FILE *write) { |
| 188 | string buffer; |
| 189 | |
| 190 | GetStubFuncDeclaration(stree, func, 0, &buffer); |
| 191 | |
| 192 | fprintf(write, "%s {\n", buffer.c_str()); |
| 193 | |
| 194 | fprintf(write, " phxrpc::HttpCaller caller(socket_, client_monitor_);\n"); |
| 195 | fprintf(write, " caller.SetURI(\"/%s/%s\", %d);\n", stree->GetPackageName(), |
| 196 | func->GetName(), func->GetCmdID()); |
| 197 | fprintf(write, " caller.SetKeepAlive(keep_alive_);\n"); |
| 198 | fprintf(write, " return caller.Call(req, resp);\n"); |
| 199 | |
| 200 | fprintf(write, "}\n"); |
| 201 | fprintf(write, "\n"); |
| 202 | } |
| 203 | |
| 204 | void ClientCodeRender::GenerateClientHpp(SyntaxTree *stree, FILE *write, const bool is_uthread_mode) { |
| 205 | char file_name[128]{'\0'}; |
nothing calls this directly
no test coverage detected