Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-20-2006
eric.hill eric.hill is offline
Registered User
 
Name: Eric Hill
Organization: Pioneer Balloon Co.
Project: Internal Research
 
Join Date: Jul 2006
Location: Wichita, KS
Posts: 25
File System Demo Explanation

I'm reading through the Ice PDF manual and have a question.

In the "developing a file system client" section, there is the following snippit of code:

Ice::ObjectPrx base = ic->stringToProxy("RootDir:default -p 10000");

That would indicate to me that this is building a proxy for the "RootDir" servants' default facet on port 10000, and since host isn't specified, it assumes localhost, right?

Then in the "developing a file system server" section, there is the following code:

NodeI::_adapter = communicator()->createObjectAdapterWithEndpoints("SimpleFilesyste m", "default -p 10000");

This would indicate to me that the adapter is listening on port 10000 (good) and on all local interfaces (also good) but with a servant name of "SimpleFilesystem".

How does the client connect to the server when the client is looking for RootDir and the server is called SimpleFilesystem?
__________________
Eric Hill - ijack.net
Pioneer Balloon Co.
Reply With Quote
  #2 (permalink)  
Old 07-20-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
This line:
Code:
NodeI::_adapter = communicator()->
createObjectAdapterWithEndpoints("SimpleFilesystem", "default -p 10000");
creates an object adapter with the name "SimpleFilesystem". It does not create an Ice object with this name by adding a servant to this object adapter.

BTW, can you please update your signature with your company or organization name?

Last edited by marc : 07-20-2006 at 11:47 AM.
Reply With Quote
  #3 (permalink)  
Old 07-20-2006
eric.hill eric.hill is offline
Registered User
 
Name: Eric Hill
Organization: Pioneer Balloon Co.
Project: Internal Research
 
Join Date: Jul 2006
Location: Wichita, KS
Posts: 25
That Explains A Bit

Thanks for the explanation Marc.

So where in the code on page 278 and 279 does the servant get created and added to the adapter? Is it just missing from the example, or am I missing it?

FYI, I added the company I work for to my sig, though I'm looking at Ice for an on-the-side project...
__________________
Eric Hill - ijack.net
Pioneer Balloon Co.
Reply With Quote
  #4 (permalink)  
Old 07-20-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
In the constructor of NodeI. See page 288-289.
Reply With Quote
  #5 (permalink)  
Old 07-20-2006
eric.hill eric.hill is offline
Registered User
 
Name: Eric Hill
Organization: Pioneer Balloon Co.
Project: Internal Research
 
Join Date: Jul 2006
Location: Wichita, KS
Posts: 25
Perfect

Now I see it - it generates a random name if it's not the root node, otherwise the magical "RootDir" name is used. Thanks for walking me through this - there's a lot to learn...
__________________
Eric Hill - ijack.net
Pioneer Balloon Co.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I start 2 registries in one IceGrid system? russule Help Center 3 02-02-2007 03:46 AM
Typo in Java Glacier2 demo properties file? bartley Bug Reports 2 02-09-2006 05:35 PM
CMake build system aka50 Patches 0 07-12-2005 05:30 AM
Windows Installer assumes System Drive is on C: RyanFogarty Comments 5 02-08-2005 08:19 AM
do you have plan that's port ice to embedded system? damingyipai Comments 3 07-28-2004 12:04 AM


All times are GMT -4. The time now is 10:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.