Commit c98339e0 authored by Lars Schieffer's avatar Lars Schieffer
Browse files

server: allow connections from different machines

parent 041fa8b0
......@@ -11,7 +11,8 @@
- [Installation](#installation)
- [Usage](#usage)
- [Protocol](#protocol)
- [Interaction Protocol](#protocol)
- [Connection to pseuCo](#pseuco)
- [Contact](#contact)
- [License](#license)
......@@ -92,7 +93,7 @@ Location of LTSmin header files
### --compile
Compile PINS model after creation in the filesystem
Compile PINS model after creation in the filesystem (Linux/macOS)
(Important: --ltsmin has to link to correct header location)
......@@ -110,7 +111,7 @@ Disable time-consuming jani-model syntax check
---
## Interactive - Protocol
## Protocol
Additionally, the JANI specification defines a WebSocket network protocol.
......@@ -120,11 +121,6 @@ Run JANI2PINS as server on a linux/macOS system using the interactive protocol
(Important: --ltsmin has to link to correct header location)
### --address ADDRESS
(default: "localhost:15291")
Adjust the web address of the server
---
......
......@@ -13,9 +13,8 @@ from src.utilities.io.communication.errors import JANI2PINSError, errorFormat
if commandline.requestServer():
# Start WebSocket Server
eventLoop = asyncio.get_event_loop()
address, port = commandline.getServerAddress().split(":")
print(f'Run JANI2PINS server at "{address}:{port}"')
server = websockets.serve(handleMessages, address, port)
print(f'Run JANI2PINS server on port: 15291"')
server = websockets.serve(handleMessages, port=15291)
try:
eventLoop.run_until_complete(server)
eventLoop.run_forever()
......
......@@ -37,9 +37,6 @@ commandLine.add_argument(
commandLine.add_argument(
"--server", action="store_true", help="Run JANI2PINS as server",
)
commandLine.add_argument(
"--address", default="localhost:15291", help='Web address (default: "%(default)s")',
)
commandLine.add_argument(
"--experiment", metavar="VALUES", help="Add experiment values (Example:C1=12,C2=6)",
)
......@@ -59,10 +56,6 @@ def requestServer():
return arguments.server
def getServerAddress():
return arguments.address
def getJANIPath():
return arguments.input
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment