The program that is running on the server is listening for a connection. It uses TcpListener from .NET. Using netstat, the port is listening.
When using a tester data sender, the connection is accepted and the data is processed. To do the same with PHP sockets does not work properly. It returns errno 111.
Looking for an answer amidst some of the PHP-related socket questions, it was said that it could be one of three things: no http server, TCP queue full, or the firewall.
Web server
$port = 6000;
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($socket, "remote.ip", $port);
socket_send($socket, $data, strlen($data), 1);
socket_close($socket);
Server
tcp = new TcpListener(IPAddress.Any, port);
tcp.Start(backlog);
sock = tcp.AcceptSocket();
Warning: socket_connect(): unable to connect [111]: Connection refused in page.php on line 10
Warning: socket_send(): unable to write to socket [32]: Broken pipe in page.php on line 11