socket deadlock

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hello all!

Im getting started learning php at the moment...with some difficulties:
I want to comunicate with a java server via sockets:

$socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
$connection = socket_connect($socket,'localhost',3141);
while($data = socket_read($socket,3141))
echo $data;

write and read seperatly are fine, but in combination they produce some
deadlock causing a timeout! I googeled a good bit, but couldnt get

can you give me any hints for this problem?



Site Timeline