Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem making a RPC server

 
   Macintosh computer (Home) -> Programmer Help RSS
Next:  USB & IEEE1394  
Author Message
Antrox

External


Since: Jul 18, 2007
Posts: 4



(Msg. 1) Posted: Thu Jul 19, 2007 5:43 am
Post subject: Problem making a RPC server
Archived from groups: comp>sys>mac>programmer>help (more info?)

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 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]