Adding client port number to be -1 or specific (#2)

pull/302/head
Chun-Sheng, Li 5 years ago committed by GitHub
parent 5a69bca68f
commit d2461a025a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,9 +32,12 @@ reportCallbackFunction(void* parameter, ClientReport report)
int main(int argc, char** argv) {
char* hostname;
int port_number = -1;
if (argc > 1)
if (argc > 2) {
hostname = argv[1];
port_number = argv[2];
}
else
hostname = "localhost";
@ -62,7 +65,7 @@ int main(int argc, char** argv) {
IedConnection con = IedConnection_createWithTlsSupport(tlsConfig);
IedConnection_connect(con, &error, hostname, -1);
IedConnection_connect(con, &error, hostname, port_number);
if (error == IED_ERROR_OK) {

Loading…
Cancel
Save