Extend the second Server
/Client
example to have unique usernames. Right now, any Client
can have any username, even one chosen by an already connected Client
. You need not display an error message to the Client
, but you can.
Extend Problem 1 to properly remove a client when they disconnect. You may need to extend ChatResponse
, and explore the method addWindowListener(WindowAdapter)
on JFrame
.