Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 14th, 2005, 4:46 PM   #1
Ack
Newbie
 
Join Date: Aug 2005
Posts: 3
Rep Power: 0 Ack is on a distinguished road
Get connected ip addresses

I have a client and server that i want the client to be able to display all the ip addresses of other clients that are connected to the server. I have no idea how to do this so if anyone has an example or somethin that would be great.
Ack is offline   Reply With Quote
Old Aug 14th, 2005, 4:48 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Client: "I want all the IPs, bitch!"
Server: "Sure - I'll send 'em to you."
Client: "Thanks."
Server: "Here you go. 202.195.81.11, etc."
Client: "I love you."

Easy as pie.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 14th, 2005, 5:56 PM   #3
Ack
Newbie
 
Join Date: Aug 2005
Posts: 3
Rep Power: 0 Ack is on a distinguished road
Haha very funny.

Common i really need some help with this.
Ack is offline   Reply With Quote
Old Aug 15th, 2005, 9:15 AM   #4
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
As the clients login to your server, store their IP addresses in a file. Have the server listen for an AllIP request from the client, then have the server read the IP data file to the client (as in send the IP data line by line as if it were messages).
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 15th, 2005, 5:46 PM   #5
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Yeah very simple Select Case around the Data_Received event on the server. What used to throw me though was that winsock occasionally randomly splits the packets in two which could result in intermittent bugs, so I'd suggest buffering the output here and using some sort of control character (e.g. vbCrLF) to signal the end of a command.

So why's your nick a TCP command?
Rory is offline   Reply With Quote
Old Aug 15th, 2005, 9:10 PM   #6
Ack
Newbie
 
Join Date: Aug 2005
Posts: 3
Rep Power: 0 Ack is on a distinguished road
Lol, i got my nick from another name i used to use for a game called utopia. My province was called acklang and everyone just called me ack for short, later when i got into programming i realized that my nick was a tcp command and so i kept it.

Anyway i will try your suggestions and see what i can do.
Ack is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC