Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

How to Read File a remotely using TCP/ip Sockets in java

Thread view: 
avdhesh.yadav@gmail.com - 18 May 2006 05:46 GMT
Hi all

let me first explain secnerio.

Actually i have to write a multithreaded program.
In this program i have to read files remotely using TCP sockets...
Everytime New file comes i have to create a new Socket and accept and
read the file.

and then after rading it i have to send it to a a client..

Thing is that file is Remotly located..
first i have to connect to that server ad then read file and send it
client..where we done processing ..

i m thinking two things ..
in one case i crrate a single socket and read files through this socket
and send it to cleint..
other is creat separate sockets and read files and then send it to
client..

Which option is correct and how i program this..

Thanks in advace
Avdhesh
dnasmars@gmail.com - 18 May 2006 15:15 GMT
It is not very clear
jcsnippets.atspace.com - 18 May 2006 20:32 GMT
> Hi all
<snipped problem>
> i m thinking two things ..
> in one case i crrate a single socket and read files through this socket
[quoted text clipped - 3 lines]
>
> Which option is correct and how i program this..

I'm afraid that I do not fully understand what you are trying to do. Like in
most cases, there are several solutions possible, and it all depends on what
you are exactly trying to do to choose the best option.

If you're downloading a file from a server, processing it on another machine
and then sending it to a third machine (the client), I would definitely
separate those two processes.

As a result of that, you'd create one connection (socket) to the server, and
another to the client.

Best regards,

JayCee
--
http://jcsnippets.atspace.com/
a collection of source code, tips and tricks


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.