File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
sdk/src/server-api/sc/networking/clients Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 22
33import sc .protocol .ProtocolPacket ;
44
5+ import java .io .Closeable ;
6+
57/** Client interface to send packages to the server. */
6- public interface IClient {
8+ public interface IClient extends Closeable {
79 /** Send a package. */
810 void send (ProtocolPacket packet );
911}
Original file line number Diff line number Diff line change @@ -249,7 +249,9 @@ protected synchronized void stopReceiver() {
249249 this .receiveThread .interrupt ();
250250 }
251251
252- protected synchronized void close () {
252+ /** Closes the client without notifying any listeners.
253+ * Prefer {@link #stop()} to end communication properly. */
254+ public synchronized void close () {
253255 if (!isClosed ()) {
254256 this .closed = true ;
255257
You can’t perform that action at this time.
0 commit comments