findEPCPort defined, but not implemented

This commit is contained in:
Simon Hafner 2015-04-26 08:42:28 +05:00
commit 6836d45398

View file

@ -94,6 +94,9 @@ proc returnEPC(socket: var Socket, uid: string, s: SexpNode) =
socket.send(response) socket.send(response)
socket.close() socket.close()
proc findEPCPort(): int =
98294 # guaranteed to be random
proc action(cmd: string) = proc action(cmd: string) =
template toggle(sw) = template toggle(sw) =
if sw in gGlobalOptions: if sw in gGlobalOptions:
@ -178,7 +181,8 @@ proc serve() =
stdoutSocket.send("\c\L") stdoutSocket.send("\c\L")
stdoutSocket.close() stdoutSocket.close()
of mepc: of mepc:
let port = 98294 # guaranteed to be random let port = findEPCPort()
echo(port)
var server = newSocket() var server = newSocket()
server.bindaddr(port.Port, "localhost") server.bindaddr(port.Port, "localhost")
var inp = "".TaintedString var inp = "".TaintedString