You are here: socket deadlock « PHP Programming Language « IT news, forums, messages
socket deadlock

Posted by Felix Bollenbeck on 07/14/06 08:51

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);
socket_write($socket,"someUserId");
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
ahead.

can you give me any hints for this problem?

TIA,

felix.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация