Welcome! Log In Create A New Profile

Advanced

CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
August 24, 2006 10:07AM
Hello .
I am a bit confused on what use argc, argv of the statement
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);

have on the client side.



For example

If you type "client" into the command prompt you will get a default server and port number.

If you type "server -ORBIIOPAddr inet:127.0.0.1:54321"

It will make the server listen on this server at port 54321.

Why will program run correctly if the client and server have initialized the orb differently?

Does the client not need to initialise the orb to the correct address and port of the server inorder to use the following?

CORBA::Object_var obj = orb->string_to_object (uri);



Any ideas

Thanks

Re: CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
August 25, 2006 10:42AM
For the server, it is picking up the address and port it must run on from your command line information in this case.

The client then finds out where the server runs using the IOR or uri and use that information to contact the server. Since the client does not listen for requests, it does not have to be told where (address and port) to listen.

The argc and argv is used to pass the command line arguments to the orb, otherwise the orb will never see them. There are a lot of arguments that can be passed to the orb for both clients and servers. It is just in this case that you are only really interested in passing some arguments to the server.
Sorry, only registered users may post in this forum.

Click here to login