lgo_Write()
Write data on a connection.
#include "laygo.h" LResult lgo_Write ( LCid cid, LDataBuffer buffer, LBufferSize count );
cid | connection to write on |
buffer | buffer containing data to write |
count | number of bytes in buffer |
lgo_Write() writes data to the connection for transmission to the remote system. A successful return by lgo_Write() means that the data has been accepted for transmission on the connection. It does not mean that the data has been successfully transmitted or received by the remote system. An end-to-end protocol should be used by the application to insure successful transmission to the remote system.
The minimum number of bytes which can be written by one call to lgo_Write() is 1. The maximum number of bytes which can be written by one call to lgo_Write() depends on the configuration of the underlying protocols and the system buffer pool.
If successful, lgo_Write() returns a non-negative value representing the number of bytes written. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if ((bytes = lgo_Write(cid, buffer, count)) < 0) { /* process error */ }