File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
src/de/javasocketapi/core Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ public void sendToAllClients(final Packet packet) {
5555 this .serverSocketAcceptingThread .sendToAllClients (packet );
5656 }
5757
58+ public void disconnectClient (final UUID uuid ) throws IOException {
59+ //disconnect client
60+ this .serverSocketAcceptingThread .disconnectClient (uuid );
61+ }
62+
5863 public void disconnectAllClients () throws IOException {
5964 //disconnect all clients
6065 this .serverSocketAcceptingThread .disconnectAllClients ();
Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ public void sendToAllClients(final Packet packet) {
6060 }
6161 }
6262
63+ public void disconnectClient (final UUID uuid ) throws IOException {
64+ //disconnect client
65+ for (Client client : this .clients ) {
66+ if (!client .getConnectionUUID ().get ().equals (uuid )) {
67+ continue ;
68+ }
69+ client .disconnect ();
70+ }
71+ }
72+
6373 public void disconnectAllClients () throws IOException {
6474 //disconnect all clients
6575 for (Client client : this .clients ) {
You can’t perform that action at this time.
0 commit comments