Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Sockets : Read, writing, and managing sockets on clients and servers
 

Read, writing, and managing sockets on clients and servers

To read and write data on a socket object, you can use one of the following models, or a combination of both:
*Procedural model — Where you poll for and read data wherever necessary using the READ( ) method on the socket handle and write data wherever necessary using the WRITE( ) method on the socket handle.
*Event-driven model — Where you wait for a READ-RESPONSE event on the socket handle. You then read and write whatever data you need on the socket handle within an event procedure that executes in response to this event.
Regardless of the model you use, you must first define and initialize a MEMPTR variable to hold the data you want to read or write.
* Defining and initializing MEMPTR variables
* Detecting data on a socket
* Reading data on a socket
* Writing data on a socket
* Marshalling and unmarshalling data for socket I/O
* Managing sockets and their connections