944,198 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 5433
  • Java RSS
Jun 28th, 2005
0

How can I use IP address to access the file names in computer?

Expand Post »
Hi,

I have a project on peer-to-peer file transferring...Now I don't have any clue how I can use just the IP address of a computer to search for files in different drives...I have used socket object to create clients...now I have the info of only IP address and port number of a client. I need to search other clients' hard drive for particular files that the client selects...
Is there any built-in java method or how can I develop a mechanism to do so?
please guys, if you do have a solution, let me know...
My deadline is approaching...

Thanx in advance for your time...

Razib
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
razibcse is offline Offline
3 posts
since Jun 2005
Jun 29th, 2005
0

Re: How can I use IP address to access the file names in computer?

Hi Everyone,

Streams is the answer.

You have to have a folder(easier than searching the entire hd) then send a list and the other side gets it and do the appropriate transfer.

ps: You have to create your own format of data packets for transfer

Richard West
Reputation Points: 25
Solved Threads: 10
Practically a Master Poster
freesoft_2000 is offline Offline
623 posts
since Jun 2004
Jun 30th, 2005
0

Re: How can I use IP address to access the file names in computer?

hmm, I think he wants far more.
He seems to want to get a complete directory structure of someone's harddisk (with all files involved) from a remote location.
That is (happily) impossible.

What is possible is asking a program on the other computer (in a P2P environment you'd have programs running on both computers after all) for a specific file and have that program search for it.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jun 30th, 2005
0

Re: How can I use IP address to access the file names in computer?

Guys,

Let me make the point clear. I need to build a peer-to-peer file transfer system, where a client uses a program to enter a search string and the server checks the other clients' computer for that file. The security measures will be considered later. First I have to develop the basic system.

My point is now how I can search in other computers using only the socket information. Of course, the client whose PC is being searched, agrees to proceed by logging in to server.

It is one of our 3r year projects. Now I am asking for a feasible mechanism to implement the searching and then begin transferring. Can you help me with some idea or any hint that I can use...

Now one thing that came to my mind after reading your posts is that if I send every client a thread containing the search string, then the thread will search its localhost drives for a match..then it can send the result back to the server. Is it possible to implement? Then I have to develop a local searching mechanism and then worry about transferring the file. Will the thread be able to transfer the file to server or other PCs? :eek:


Thanks a lot guys for replying...Looking forward to hear you...

Razib
Reputation Points: 10
Solved Threads: 0
Newbie Poster
razibcse is offline Offline
3 posts
since Jun 2005
Jul 1st, 2005
0

Re: How can I use IP address to access the file names in computer?

You don't do it like that.
Either you have each client send a complete description of their filesystems to the server when first signing up and later regular updates and do all the searching on the server OR (and that's the best way) you have the server marshall the requests and have each client perform the actual search and send the results back to the server for return to the client initiating the search.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Could someone help please and thankyou
Next Thread in Java Forum Timeline: Please help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC