File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
src/de/javasocketapi/core Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11# JavaSocketAPI
22
3- ## An api for java with the native Java socket technology.
3+ ## An api for java with the native Java socket technology and [ the java boonproject ] ( https://github.com/boonproject/boon ) .
Original file line number Diff line number Diff line change 11package de .javasocketapi .core ;
22
3- import javafx .beans .property .SimpleObjectProperty ;
4-
53import java .io .IOException ;
64import java .util .UUID ;
5+ import java .util .concurrent .atomic .AtomicReference ;
76
87abstract class Connection {
98
10- private volatile SimpleObjectProperty <UUID > connectionUUID ;
9+ private volatile AtomicReference <UUID > connectionUUID ;
1110
12- public SimpleObjectProperty <UUID > getConnectionUUID () {
11+ public AtomicReference <UUID > getConnectionUUID () {
1312 return connectionUUID ;
1413 }
1514
1615 {
17- this .connectionUUID = new SimpleObjectProperty <>(UUID .randomUUID ());
16+ this .connectionUUID = new AtomicReference <>(UUID .randomUUID ());
1817 }
1918
2019 public abstract void connect () throws IOException ;
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public void run() {
4646 public void sendToClient (Packet packet , UUID uuid ) {
4747 //send to client
4848 for (Client client : this .clients ) {
49- if (!client .getConnectionUUID ().equals (uuid )) {
49+ if (!client .getConnectionUUID ().get (). equals (uuid )) {
5050 continue ;
5151 }
5252 client .send (packet );
You can’t perform that action at this time.
0 commit comments