Problem making a RPC server
Problem making a RPC server
- Subject: Problem making a RPC server
- From: "Antonio Gil García" <email@hidden>
- Date: Wed, 18 Jul 2007 14:02:49 +0200
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.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden