Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-16-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
get client's IP using glacier2router

hi ,

how Ice server can get the ICE client's IP if i use glacier2router?

Andrew
Reply With Quote
  #2 (permalink)  
Old 04-16-2008
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
You would have to send it as part of a request. There is no way to find out the IP address implicitly. In general, I would be careful with any design that relies on having to know the client's IP address other than for debug purposes. What do you need it for?
Reply With Quote
  #3 (permalink)  
Old 04-16-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
because i want send the client ip to another client , i want to use the server like a ip triangolator .

i obtain the ip of client call the current.con->toString() from a callback, have another idea?

Last edited by Andrew : 04-16-2008 at 09:08 AM.
Reply With Quote
  #4 (permalink)  
Old 04-16-2008
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
What does the other client do with the IP address? If you want the two clients to communicate with each other directly, then the usual way to do this is to send a proxy from one client to the other over the server. The proxy embeds the IP address and any additional information that is required to reach the client.
Reply With Quote
  #5 (permalink)  
Old 04-17-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
i have patch the source code of Glacier2 :

in SessionRouterI.cpp:
function : virtual void createSession()
I add that:
Code:
 		string str(_current.con->toString());
		string key("remote address = ");
		size_t start(str.rfind(key));
	
		if(start != string::npos)
		{
			str = str.substr(start + key.length());
			str = str.substr(0, str.find_first_of(":")) ;
		}
		else
			str = "";

		map<string, string> contextMap;
		contextMap["remote"]=str;

        _sessionRouter->_sessionManager->create_async(new CreateCB(this), _user, _control, contextMap );//_current.ctx);
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
A problem of glacier2router GlacierX Help Center 17 01-29-2008 12:34 PM
Bug of Glacier2Router GlacierX Bug Reports 5 04-11-2007 06:00 AM
How to get client's ip address when I use Glacier? ewiniar Help Center 2 06-16-2006 06:55 AM
Can Ice server get the ICE client's IP? richardma Help Center 1 12-23-2005 09:05 AM
How to get client's IP address zephyr007 Help Center 4 12-28-2004 10:58 AM


All times are GMT -4. The time now is 01:12 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.