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.