// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/exception/ConnectionNotAliveException.java
// public class ConnectionNotAliveException extends DragoniteException {
// 
//     public ConnectionNotAliveException() {
//         super("Connection is not alive");
//     }
// 
//     public ConnectionNotAliveException(final String msg) {
//         super(msg);
//     }
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/exception/IncorrectSizeException.java
// public class IncorrectSizeException extends DragoniteException {
// 
//     public IncorrectSizeException(final String msg) {
//         super(msg);
//     }
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/exception/SenderClosedException.java
// public class SenderClosedException extends DragoniteException {
// 
//     public SenderClosedException() {
//         super("Sender closed");
//     }
// 
//     public SenderClosedException(final String msg) {
//         super(msg);
//     }
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/misc/DragoniteGlobalConstants.java
// public final class DragoniteGlobalConstants {
// 
//     public static final String LIBRARY_VERSION = DragoniteBuildConfig.VERSION;
// 
//     public static final byte PROTOCOL_VERSION = 2;
// 
//     public static final int MIN_SEND_WINDOW_SIZE = 20;
// 
//     public static final int ACK_INTERVAL_MS = 10;
// 
//     public static final int MAX_FAST_RESEND_COUNT = 3;
// 
//     public static final int MAX_SLOW_RESEND_MULT = 4;
// 
//     public static final int INIT_RTT_MS = 200, RTT_MAX_VARIATION_MS = 200, RTT_UPDATE_INTERVAL_MS = 100, RTT_RESEND_CORRECTION_INTERVAL_MS = 2000;
// 
//     public static final int DEV_RTT_MULT = 4;
// 
//     public static final float RTT_RESENDED_REFRESH_MAX_MULT = 1.5f;
// 
//     public static final int MIN_CLOSE_WAIT_MS = 100, CLOSE_WAIT_RTT_MULT = 4;
// 
//     public static final int WEB_PANEL_PORT = 8000;
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/msg/Message.java
// public interface Message {
// 
//     byte getVersion();
// 
//     MessageType getType();
// 
//     byte[] toBytes();
// 
//     int getFixedLength();
// 
// }


import com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException;
import com.vecsight.dragonite.sdk.exception.IncorrectSizeException;
import com.vecsight.dragonite.sdk.exception.SenderClosedException;
import com.vecsight.dragonite.sdk.misc.DragoniteGlobalConstants;
import com.vecsight.dragonite.sdk.msg.Message;
import java.io.IOException;
import java.net.SocketAddress;
    @Override
    protected void updateLastReceiveTime() {
        lastReceiveTime = System.currentTimeMillis();
    }

    @Override
    public long getLastReceiveTime() {
        return lastReceiveTime;
    }

    @Override
    protected void updateLastSendTime() {
        lastSendTime = System.currentTimeMillis();
    }

    @Override
    public long getLastSendTime() {
        return lastSendTime;
    }

    protected void sendHeartbeat() throws InterruptedException, IOException, SenderClosedException {
        sender.sendHeartbeatMessage();
    }

    @Override
    public byte[] read() throws InterruptedException, ConnectionNotAliveException {
        return receiver.read();
    }

    @Override
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/exception/ConnectionNotAliveException.java
// public class ConnectionNotAliveException extends DragoniteException {
// 
//     public ConnectionNotAliveException() {
//         super("Connection is not alive");
//     }
// 
//     public ConnectionNotAliveException(final String msg) {
//         super(msg);
//     }
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/exception/IncorrectSizeException.java
// public class IncorrectSizeException extends DragoniteException {
// 
//     public IncorrectSizeException(final String msg) {
//         super(msg);
//     }
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/exception/SenderClosedException.java
// public class SenderClosedException extends DragoniteException {
// 
//     public SenderClosedException() {
//         super("Sender closed");
//     }
// 
//     public SenderClosedException(final String msg) {
//         super(msg);
//     }
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/misc/DragoniteGlobalConstants.java
// public final class DragoniteGlobalConstants {
// 
//     public static final String LIBRARY_VERSION = DragoniteBuildConfig.VERSION;
// 
//     public static final byte PROTOCOL_VERSION = 2;
// 
//     public static final int MIN_SEND_WINDOW_SIZE = 20;
// 
//     public static final int ACK_INTERVAL_MS = 10;
// 
//     public static final int MAX_FAST_RESEND_COUNT = 3;
// 
//     public static final int MAX_SLOW_RESEND_MULT = 4;
// 
//     public static final int INIT_RTT_MS = 200, RTT_MAX_VARIATION_MS = 200, RTT_UPDATE_INTERVAL_MS = 100, RTT_RESEND_CORRECTION_INTERVAL_MS = 2000;
// 
//     public static final int DEV_RTT_MULT = 4;
// 
//     public static final float RTT_RESENDED_REFRESH_MAX_MULT = 1.5f;
// 
//     public static final int MIN_CLOSE_WAIT_MS = 100, CLOSE_WAIT_RTT_MULT = 4;
// 
//     public static final int WEB_PANEL_PORT = 8000;
// 
// }
// 
// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/msg/Message.java
// public interface Message {
// 
//     byte getVersion();
// 
//     MessageType getType();
// 
//     byte[] toBytes();
// 
//     int getFixedLength();
// 
// }


// Path: dragonite-sdk/src/main/java/com/vecsight/dragonite/sdk/socket/DragoniteServerSocket.java
import com.vecsight.dragonite.sdk.exception.ConnectionNotAliveException;
import com.vecsight.dragonite.sdk.exception.IncorrectSizeException;
import com.vecsight.dragonite.sdk.exception.SenderClosedException;
import com.vecsight.dragonite.sdk.misc.DragoniteGlobalConstants;
import com.vecsight.dragonite.sdk.msg.Message;
import java.io.IOException;
import java.net.SocketAddress;

    @Override
    protected void updateLastReceiveTime() {
        lastReceiveTime = System.currentTimeMillis();
    }

    @Override
    public long getLastReceiveTime() {
        return lastReceiveTime;
    }

    @Override
    protected void updateLastSendTime() {
        lastSendTime = System.currentTimeMillis();
    }

    @Override
    public long getLastSendTime() {
        return lastSendTime;
    }

    protected void sendHeartbeat() throws InterruptedException, IOException, SenderClosedException {
        sender.sendHeartbeatMessage();
    }

    @Override
    public byte[] read() throws InterruptedException, ConnectionNotAliveException {
        return receiver.read();
    }

    @Override
    public void send(final byte[] bytes) throws InterruptedException, IncorrectSizeException, IOException, SenderClosedException {