tcp_server()


做为服务器等待TCP连接

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