• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem making a RPC server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: tcp checksum calculation incorrect - off by 2
  • Next by Date: Re: tcp checksum calculation incorrect - off by 2 - Solved
  • Previous by thread: Re: tcp checksum calculation incorrect - off by 2
  • Next by thread: Re: tcp checksum calculation incorrect - off by 2 - Solved
  • Index(es):
    • Date
    • Thread