Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Sockets : Read, writing, and managing sockets on clients and servers : Detecting data on a socket : Data detection using the procedural model
 
Data detection using the procedural model
To detect data procedurally, you can simply read whatever data is available on the socket object using the READ( ) method. Using this model, you do not use the READ-RESPONSE event, and ABL does not automatically notify your application when data is available to read on the socket. You can also check:
*To see if the socket is connected using the CONNECTED( ) method
*To see how many bytes are available to read, using the GET-BYTES-AVAILABLE( ) method
How you use these methods depends on your application requirements and the options that you choose on the READ( ) method. For more information on READ( ) method options, see Readingdata on a socket.