hi i have written a small chat application.. gui created using frames.. both can send text to one other using socket programing over the localhost.. is it possible to send files too along with just text??

Pls help

Regards,
Bharat Shivram

Recommended Answers

All 3 Replies

It's easy. Just Google for it.

It's easy. Just Google for it.

Huh!!! already did that.. can't find anything, that's why i posted my query to this forum.....:icon_exclaim:

Open the file into a FileInputStream, read (say) 1024 bytes at a time, send them over the Socket connection. At the other end read the incoming bytes from the socket and write them toa FileOutputStream. Wrap the whole process in a simple protocol for requesting a file and hey presto!

commented: thanx.. +3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.