SOCKET连接接收不到数据
现在手头有个项目要建立PHP(client)和JAVA(server)的SOCKET连接,传递数据:
现在SOCKET连接建立是成功的,而且PHP发过来的测试数据,在SERVER端也是收的到的
问题是SERVER发出的数据,在PHP接收不到。请问各位有何看法啊?
背景资料:
1.SERVER端发送数据应该是成功的(不确定),因为并没有任何报错
2.PHP老是出现这样的警告:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in G:\AppServ\www\sock\index1.php on line 4
第4行:if (! ($fd = fsockopen("192.168.0.103",8888,&$error_number,&$error_des,60)))
3.PHP接受数据用的
echo fgets($fd,100000);
4. JAVA端发送数据是:
OutputStream out = clientSocket.getOutputStream();
PrintWriter out1 = new PrintWriter(out,true);
out1.println("我是007");