I have a PHP socket application which connects to a server and sends some data,
i need to extend this script to send (write) and listen back for a replay from the server
i was trying using socket_read() after socket_write()
but it hangs the script.
any idea on this ?
for a workaround add a
sleep(1)after the write, then start reading.Check the return value of the write operation as well first. Does return the number of bytes written, FALSE on error.