Skip to content

Commit

Permalink
Revert "Add DCSBIOS_ADD_EXPORT_TARGET and DCSBIOS_REMOVE_EXPORT_TARGE…
Browse files Browse the repository at this point in the history
…T commands"

This reverts commit ae772c9.

While trying to implement this on the client side it became
apparent that this changeset was not fully thought through.

There is no way to reliably stop exporting to the additional
target IP/Port once that client has been closed. Doing so
would require implementing a keep-alive mechanism.

We have TCP support now, which mostly solves the same problem
in a simpler way (with the disadvantage of a very small
performance penalty).

Additional UDP targets can still be used by statically configuring
them in BIOSConfig.lua.

Closes #6.
  • Loading branch information
jboecker committed Dec 26, 2014
1 parent 69b380f commit 3072239
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Scripts/DCS-BIOS/lib/Protocol.lua
Expand Up @@ -60,22 +60,6 @@ function BIOS.protocol.processInputLine(line)
argumentCache = {}
end
if cmd then
if cmd == "DCSBIOS_ADD_EXPORT_TARGET" then
local ip, port = args:match("^([^:]+):([0-9]+)")
local newIoConnection = BIOS.protocol_io.UDPSender:create({ host = ip, port = port })
newIoConnection:init()
BIOS.protocol_io.connections[#BIOS.protocol_io.connections + 1] = newIoConnection
end
if cmd == "DCSBIOS_REMOVE_EXPORT_TARGET" then
local ip, port = args:match("^([^:]+):([0-9]+)")
local newConns = {}
for _, c in pairs(BIOS.protocol_io.connections) do
if not (c.host == ip and c.port == port) then
newConns[#newConns+1] = c
end
end
BIOS.protocol_io.connections = newConns
end
if acftModule then
if acftModule.inputProcessors[cmd] then
acftModule.inputProcessors[cmd](args)
Expand Down

0 comments on commit 3072239

Please sign in to comment.