This commit is contained in:
Administrator
2025-04-24 10:16:38 +08:00
parent 6de65562be
commit 7267aec1fd
108 changed files with 7621 additions and 1890 deletions
@@ -2,13 +2,26 @@ package org.kne.cloud.network.klalb;
import java.io.IOException;
import java.net.SocketException;
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicLong;
import org.kne.cloud.network.MultipurposeSocketAddress;
public interface KLALBPacketLink {
public void writePacket(KLALBPacket kp) throws IOException;
public void setOutputTrafficCounters(AtomicLong[] al);
public void setOutputPacketsCounters(AtomicLong[] al);
public void setInputTrafficCounters(AtomicLong[] al);
public void setInputPacketsCounters(AtomicLong[] al);
public void writePacket(ByteBuffer kp) throws IOException;
public default void writePackets(ByteBuffer[] kpp,int off,int len) throws IOException {
for (int i = 0; i < len; i++) {
writePacket(kpp[off+i]);
}
}
public void writeKLALBPacket(KLALBPacket kp) throws IOException;
public void flush() throws IOException;
public KLALBPacket readPacket()throws IOException;
public KLALBPacket readKLALBPacket()throws IOException;
public ByteBuffer readPacket()throws IOException;
public void close() throws IOException;
public boolean isClosed();
public void setSoTimeout(int val) throws SocketException;