Progress
External Program
Interfaces


Writing Data On a Socket

You can write data on a connected TCP/IP socket at any time using the WRITE( ) method on the corresponding socket object (SELF:WRITE( ) within the corresponding READ-RESPONSE event procedure).

The syntax of the WRITE( ) method follows:

SYNTAX
WRITE(
      memptr-expression 
    , position 
    , bytes-to-write 
    ) 

The WRITE( ) method transfers the number of bytes specified by the INTEGER expression, bytes-to-write, from the specified MEMPTR variable, memptr-expression, to the socket starting from the byte position within the MEMPTR region specified by the INTEGER expression, position.

You can verify the number of bytes actually written by the WRITE( ) method. The number of bytes written by the last WRITE( ) method invoked on a socket object is equal to the value of the BYTES-WRITTEN attribute invoked on the same socket object.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095