Problem making a RPC server
- From: Antrox <antonio.gil.garcia@xxxxxxxxx>
- Date: Wed, 18 Jul 2007 11:39:46 -0000
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.
.
- Prev by Date: Problem making a RPC server
- Next by Date: Re: How to add option-or-control keyboard equivalents...
- Previous by thread: Re: Problem making a RPC server
- Next by thread: Problem making a RPC server
- Index(es):
Relevant Pages
|