Php Listener / Client Lopped正在收听服务器?

Hey is it possible to listen in Php to a TCP Server ? Like Tcp Server sends Hello to Php And then its Echo Hello World ?

I already tried witch socket_listen(); in a Loop

But this does make a Endless loading Page and its creating a Server again ?

So is there a way ? If yes how ? Or maybe with asp.net ?

Thanks for every Answer

Here my Code i tried already

function listen(){
// Set the ip and port we will listen on
$address = '127.0.0.1';
$port = 8001;
// Create a TCP Stream socket
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
// Bind the socket to an address/port
$bind = socket_bind($sock, $address, $port);
// Start listening for connections
socket_listen($sock);
/* Accept incoming requests and handle them as child processes */
$client = socket_accept($sock);
// Read the input from the client – 1024 bytes
$input = socket_read($client, 2024);
// Strip all white spaces from input
echo $input;
// Close the master sockets
$close = socket_close($sock);
var_dump($close);
listen();
}
set_time_limit (0);
listen();