Forums Register Login

sockets, streams, and confusion

+Pie Number of slices to send: Send
Hey Java Gurus,

I wrote a simple chat program. Now I am trying to modify the server so that will chat on one port and transfer a file on another. When I run this class, the writeFile() method does not diplay any of its System.out.println() messages which makes me believe it is not being called. Thanks for any help you can give. I really do appreciate it.

Adam

+Pie Number of slices to send: Send
In the constructor you call both listen() and writeFile(). First listen() is invoked from the constructor, but it never leaves because you have a while(true) loop in there.
So it never breaks out of the constructor.
Hope that helps.
please buy this thing and then I get a fat cut of the action:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1375 times.
Similar Threads
ServerSocket not oppening
Need help with thread pool issue..
Limit number of connections
Creating a Pipe that connects 2 sockets
Simple program for URL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 15:43:12.