setTimeout
Purpose
This method sets timeout value for all get methods. The value is in milliseconds. A value of zero (0) means "NO Timeout". This method can be called at any time once you have a "token", and is the timeout value until another "setTimeout" is issued.
Example
S7RClientSSj conn = new S7RClientSSj(); S7RClientSSjToken token = conn.Connect(url, userid, password); conn.setTimeout(token, 10*1000); // set 10 second timeout on gets byte[] dataIn = conn.receiveWait(token); if (dataIn != null) { conn.setTimeout(token, 5*1000); // set 5 second timeout on registration response conn.sendRegistration(token, ServiceType.Trigger, “myServiceName”); } conn.Disconnect(token);
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.