tcpWrite()

Writes data to the defined socket.

Synopsis

int tcpWrite( int socket, string/blob data);

Parameters

Parameter Description
socket Number of the sockets
data Data to be written

Return value

Number of sent bytes, or -1 if an error occurs. Errors can be retrieved with getLastError().

Error

Missing or wrong arguments.

Description

Writes data to the defined socket.

Example

main()
{
  dyn_errClass err;
  int write, socket;
  string data;
  socket=100;
  data="Data";
  write=tcpWrite(socket, data);
  err=getLastError();
  DebugN(write);
  DebugN(err);
}

Assignment

Communication functions

Availability

CTRL