Open jigar88 opened 2 years ago
Hello, since you are creating the server from ServerBuilder
, you do not need configuration files.
The problem in the code is that sample_user_id
is not defined. You could replace this to a string:
.user_token("sample_user_id", ServerUserToken::user_pass("user1", "user1pass"))
Probably the best way to start is to look at new_sample() in builder.rs since that produces a working sample server config and demonstrates how to programmatically create one. You can also prime the ServerBuilder by calling from_config(), supplying a ServerConfig you loaded from a path, or some hybrid. Just depends on which settings you want to program in and which you wish to load in.
Hello ,
I am trying to create an OPC server from ServerBuilder. I have copied details from the server.config file from the demo server but not able to create a server. Is there something I am missing. Here is the sample code for server creation .