MechanicalEmbeddedServer#

class ansys.mechanical.core.embedding.rpc.server.MechanicalEmbeddedServer(service: Type[rpyc.Service] = MechanicalService, port: int = None, version: int = None, methods: List[Callable] = [], impl=None)#

Start rpc server.

Overview#

start

Start server on specified port.

stop

Stop the server.

get_free_port

Get free port.

Import detail#

from ansys.mechanical.core.embedding.rpc.server import MechanicalEmbeddedServer

Method detail#

static MechanicalEmbeddedServer.get_free_port(port=None)#

Get free port.

If port is not given, it will find a free port starting from PYMECHANICAL_DEFAULT_RPC_PORT.

MechanicalEmbeddedServer.start() None#

Start server on specified port.

MechanicalEmbeddedServer.stop() None#

Stop the server.