Writing data on a socket
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
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 or method).
The is the syntax of the WRITE( ) method:
Syntax
|
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.