Hi!
Iīm making a RPC server, Iīm using the code generated by RPCGen from a
..x file. The client code works ok. But Iīm trying to make the serve.
Some function donīt work well, pmap_unset function dosenīt work, it
returns me false. svcudp_create or svctcp_create actually return me a
handler (I think they are ok) but sve_register dosenīt either work, it
returns false. I donīt know why they donīt work ok. Does anyone know
it? The main source code where I create the serve is bellow:
int
main(argc, argv)
int argc;
char *argv[];
{
SVCXPRT *transp = NULL;
(void) pmap_unset(PROG, PROG1);
transp = svcudp_create(RPC_ANYSOCK);
if (transp == NULL)
exit(1);
if (!svc_register(transp, PROG, PROG1, prog_1, IPPROTO_UDP))
exit(1);
transp = svctcp_create(RPC_ANYSOCK, 0, 0);
if (transp == NULL)
exit(1);
if (!svc_register(transp, PROG, PROG1, prog_1,IPPROTO_TCP))
exit(1);
svc_register(transp, PROG, PROG1, prog_1,IPPROTO_TCP);
svc_run();
exit(1);
}
Thanks.
>> Stay informed about: Problem making a RPC server