سؤال

How do I handle multiple clients in Java without getting "connection refused" error?

هل كانت مفيدة؟

المحلول

This is an older post of mine.. I hope it can help you a bit. It is a small app with a server and 3 clients. Every time a client sends a message to the server, the server sends it to the rest of the clients

نصائح أخرى

You could use a library QuickServer; it will make your life much easier, since this is cookie cutter code. QuickServer will take care of setting up and managing your threads.

By creating a multithreaded server: Google

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top