Skip to content

Commit 9306b55

Browse files
committed
Version 1.0.3
- Let PacketClient expose their api port. - Let PacketClient also synchronize incoming packets whenever it sends a packet.
1 parent a81bdb2 commit 9306b55

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>de.scriptsdk</groupId>
77
<artifactId>core</artifactId>
8-
<version>1.0.2</version>
8+
<version>1.0.3</version>
99
<name>core</name>
1010

1111
<properties>

src/main/java/de/scriptsdk/core/model/network/PacketClient.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public PacketClient(String url, Integer port) {
4444
onEventAction = null;
4545
}
4646

47+
public Integer getPort() {
48+
return port;
49+
}
50+
4751
public PacketReaderAction getOnEventAction() {
4852
return onEventAction;
4953
}
@@ -147,6 +151,7 @@ public PacketReader exchange(PacketType type, PacketWriter writer) {
147151
public void send(PacketType type, PacketWriter writer) {
148152
int nextSequence = internalWrite(type, writer);
149153
removeSequenceFromQueue(nextSequence);
154+
synchronizePacketsInReaderQueue();
150155
}
151156

152157
public void send(PacketType type) {

0 commit comments

Comments
 (0)