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 is the syntax of the WRITE( ) method:
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.