This commit is contained in:
NikolajDanger
2023-01-04 13:32:54 +01:00
parent 27bd644a94
commit f9a0c044c0
287 changed files with 28448 additions and 0 deletions

32
Assignment-2/server.ol Normal file
View File

@ -0,0 +1,32 @@
from .ServerInterface import ServerInterface
from file import File
constants {
FILENAME = "received.txt"
}
service ExampleServer {
embed File as file
inputPort server {
Location: "socket://localhost:9000"
Protocol: http
Interfaces: ServerInterface
}
execution:concurrent
main {
setFile( request )( response ) {
writeFile@file( {
filename = FILENAME
content = request
append = 1
} )()
}
}
}