tcp_server()


Listenning a port as a TCP server

Description

void tcp_server(int $tcp_id, int $port)

Parameters

Return Value

none

Example

<?php
include "/lib/sn_tcp_ac.php";
$port = 1470;          // TCP port number to accept
tcp_server(0, $port);  // listenning the port for a TCP connection (TCP ID: 0)
sleep(15);
?>

See also