socket problems

From: Date: Thu, 24 Aug 2000 18:59:31 +0000
Subject: socket problems
Groups: php.general 
Request: Send a blank email to php-general+get-13500@lists.php.net to get a copy of this message
I'm connecting to a server via UDP using fsockopen(). Once I send a message to the server, the server replies asynchronously with messages, and the messages are of various sizes, basically there isn't info in the message about the length of each message. And because of that, I'm having trouble trying to extract each message from the socket, as it keeps appending itself with messages from the server. I'm using fread() of course, the server returns binary data that is. Is there anyway I could make it tell me that there is a new message in the socket and I can easily extract a message which is of various sizes ? In tools such as VB, it was easy, everytime new data arrived, it would trigger an event. I'm hoping for something similar which would at least make things slightly easier for me then Regards

« previous php.general (#13500) next »