0

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

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by JamesCherrill
0

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:

1

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!

Votes + Comments
thanx..
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.