Example – using Net_Socket


Sending and recieving data

= new Net_Socket() ;

// open connection

// Send data including linebreak
$socket->writeLine("String with data");

// receive data until linebreak
$result $socket->readLine();

// receive a number of data
$result $socket->read(512);

// close connection
write data including EOL (Previous) Net_Traceroute (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.