Small changes
This commit is contained in:
@@ -28,8 +28,10 @@ import org.openautonomousconnection.protocol.packets.v1_0_1.beta.web.impl.stream
|
||||
import org.openautonomousconnection.protocol.packets.v1_0_1.beta.web.impl.stream.WebStreamEndPacket_v1_0_1_B;
|
||||
import org.openautonomousconnection.protocol.packets.v1_0_1.beta.web.impl.stream.WebStreamStartPacket_v1_0_1_B;
|
||||
import org.openautonomousconnection.protocol.side.client.ProtocolClient;
|
||||
import org.openautonomousconnection.protocol.side.client.ProtocolWebClient;
|
||||
import org.openautonomousconnection.protocol.side.ins.ProtocolINSServer;
|
||||
import org.openautonomousconnection.protocol.side.server.ProtocolCustomServer;
|
||||
import org.openautonomousconnection.protocol.side.web.ProtocolWebServer;
|
||||
import org.openautonomousconnection.protocol.versions.ProtocolVersion;
|
||||
import org.openautonomousconnection.protocol.versions.v1_0_0.beta.ProtocolWebServer_1_0_0_B;
|
||||
|
||||
@@ -287,7 +289,13 @@ public final class ProtocolBridge {
|
||||
* @return true if the target packet is supported, false otherwise
|
||||
*/
|
||||
public boolean isPacketSupported(OACPacket packet) {
|
||||
return isVersionSupported(packet.getProtocolVersion());
|
||||
boolean compatible = false;
|
||||
|
||||
for (ProtocolVersion compatibleVersion : packet.getCompatibleVersions()) {
|
||||
if (!compatible) compatible = isVersionSupported(compatibleVersion);
|
||||
}
|
||||
|
||||
return compatible;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -350,7 +358,7 @@ public final class ProtocolBridge {
|
||||
* @return true if the current instance is running as a web server, false otherwise
|
||||
*/
|
||||
public boolean isRunningAsWebServer() {
|
||||
return isRunningAsServer() && protocolServer instanceof ProtocolWebServer_1_0_0_B;
|
||||
return isRunningAsServer() && protocolServer instanceof ProtocolWebServer;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user