Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,29 @@
$ include "seed7_05.s7i";
include "socket.s7i";
include "listener.s7i";
const proc: main is func
local
var listener: aListener is listener.value;
var file: existingConnection is STD_NULL;
var file: newConnection is STD_NULL;
begin
aListener := openInetListener(12321);
listen(aListener, 10);
while TRUE do
waitForRequest(aListener, existingConnection, newConnection);
if existingConnection <> STD_NULL then
if eof(existingConnection) then
writeln("Close connection " <& numericAddress(address(existingConnection)) <&
" port " <& port(existingConnection));
close(existingConnection);
else
write(existingConnection, gets(existingConnection, 1024));
end if;
end if;
if newConnection <> STD_NULL then
writeln("New connection " <& numericAddress(address(newConnection)) <&
" port " <& port(newConnection));
end if;
end while;
end func;