php sockets read json array from java server
问题 I am connecting to a server written in JAVA using TCP/IP. My application sends json arrays to this server and in some cases also expects some results, json arrays. The problem is that i can easily send json via tcp but when reading it the script freezes waiting forever until it timeouts. Here is my code. $sock = socket_create(AF_INET, SOCK_STREAM, 0) //Creating a TCP socket or die("error: could not create socket\n"); $succ = socket_connect($sock, Application_Model_Config::serverHost,