Promotic

ReadFromSocket - method of the PmaData object

Description:
Reading the data from the server group via Ethernet (TCP/IP) by means of the sockets.
Syntax:
Boolean ReadFromSocket()
Return value:
true - The method successfully queued the request for reading data from server. After data transfer the onEndOfTransfer event is triggered.
false - The method hasn't queued the request for reading data. Probably the previous message about sending/receiving by sockets of this object hasn't been finished yet. The onEndOfTransfer event is not triggered.
Note:
This method is not functional for PmFree.

The method only activates the data transfer but there is no assurance that data are already transferred after ending this method. The data transfer termination is announced by the the onEndOfTransfer event.
Calling this method is meaningful only if the "Sockets" tab is configured as Socket client.
Variables on the "Data" tab of this object are filled up by the incoming data.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oData = pMe.Pm("/Data");
oData.ReadFromSocket();
// or
var bDone = oData.ReadFromSocket();   // bDone = true or false
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.