[PHP] Socket communications question

2006-10-13 Thread Jeff Lanzarotta
Hello,

I am trying to get a php web page to communicate with a java
application with little success...

I can get the php page to send the request to the java application,
just fine. But when the java app sends the response back, the php page
does not seem to get it...

As a side note, the java app works just fine if the client is another
java app, or a C app. Everything is send and received just fine...

From what I can tell in the php page, the

while ($out = socket_read($socket, 2048, PHP_NORMAL_READ))
{
  echo $out;
}

never returns.

Any ideas?

-Jeff


-Jeff

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Socket communications question

2006-10-13 Thread Richard Lynch
On Fri, October 13, 2006 11:15 am, Jeff Lanzarotta wrote:

How did you open the socket?

Did you check that it's valid?

You've already written to it, right?...

And Java got the data you sent?

One hack would be to try opening one socket just for reading and one
just for writing...

Might work out what's going on from that.

Or, if it works, just live with 2 one-way sockets instead of a 2-way
socket.

 while ($out = socket_read($socket, 2048, PHP_NORMAL_READ))
 {
   echo $out;
 }

 never returns.

 Any ideas?

 -Jeff


 -Jeff

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php