Skip to main content
DVS Server used to receive data from DVS Clients. DVS Servers receive data from the DVS Clients. A server can be ran as part of the postprocessing package (such as EnSight) or within any process as it is part of the DVS API. A server object is always used by the client to connect to a server (if starting a server locally it must be started before connecting with the client). However this server object is only a shell/proxy object unless it is started using dvs_server_start() or DVS::IServer::startup(). If a server isn’t started it is assumed another process/thread has started it and it is only used for connecting the client to the real server. A DVS server by default will listen to 127.0.0.1 for client connections by default. The server will also use Unix Domain Sockets by default, on Linux. In this default scenario, SSL certificates won’t be enforced. The port is still a required input, since it is being used to build the socket path. The default unix domain socket is unix:/tmp/greeter{PORT}.sock. The user can change the default path /tmp/greeter setting the SERVER_UNIX_DOMAIN_PATH parameter. On Windows, if the use of TCP sockets are not explicitly set, the connection will only happen on localhost, but internally TCP sockets will still be used. In this default scenario, certificates won’t be used. The user can enforce the use of TCP sockets settings explicitly the option SERVER_USE_TCP_SOCKETS=1. This is required if the user wants the server-client connection to happen between different machines. In this case, the use of SSL certificates is enforced. On can disable explicitly the use of SSL certificates setting the option SERVER_DISABLE_TLS=1. The SSL certificates generation is the user responsibility. When TCP sockets are enabled, the user can explicitly set the server to listen to all networks setting the parameter SERVER_LISTEN_ALL_NETWORKS=1. In this scenario, the DVS server will listen to 0.0.0.0 for client connections, unless the user explicitly sets the host via the SERVER_HOST parameter. If TCP sockets and all networks are enabled, the use of secret keys is enforced. The user can set a secret key via the SERVER_SECURITY_SECRET parameter. The SSL certificates are expected, by default in the current working directory, under the following locations:
  • certs/server.crt
  • certs/server.key
  • certs/ca.crt
  • certs/client.crt
  • certs/client.key
The default folder can be overridden via the environment variable ANSYS_GRPC_CERTIFICATES. The full location of each certificate can be overridden via the environment variables GRPC_SERVER_CERT, GRPC_SERVER_KEY and GRPC_SERVER_CLIENT_CA. The settings for SERVER_LISTEN_ALL_NETWORKS, SERVER_DISABLE_TLS, SERVER_USE_TCP_SOCKETS and SERVER_UNIX_DOMAIN_PATH can also be set via environment variables, respectively being DVS_LISTEN_ALL_NETWORKS, DVS_DISABLE_TLS, DVS_USE_TCP_SOCKETS and DVS_UNIX_DOMAIN_SOCKET_PATH. If any of these environment variables is set, it will override the eventual values set on the server. For instance, if the user sets the option SERVER_LISTEN_ALL_NETWORKS and also the environment variable DVS_GRPC_ALLOW_NETWORK_CONNECTIONS, the second will be applied.

Server Options

Server options are specified by the C API call dvs_server_set_option(), or the C++ API call DVS::IServer::set_option().