|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-15 07:18 UTC] sander@php.net
[2002-01-15 11:20 UTC] webmaster at weathermetrics dot com
[2002-01-15 13:28 UTC] webmaster at weathermetrics dot com
[2002-01-15 14:26 UTC] webmaster at weathermetrics dot com
[2002-01-15 14:38 UTC] webmaster at weathermetrics dot com
[2002-05-11 18:51 UTC] mfischer@php.net
[2002-06-12 01:00 UTC] php-bugs at lists dot php dot net
[2002-06-12 12:28 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 17:00:01 2025 UTC |
I keep getting the following error: "Microsoft Visual Basic Run-time error '10054': THe connection is reset by remote side" when I try to connect a PHP UDP socket to a VB Application. I am trying to dump a small packet of data to the VB program using the following PHP code: $port=getPort($t); $host=getHost($t); $prot=getProtocol($t); $fp = fsockopen ($prot.$host, $port, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { $w=fputs ($fp, URLUnEncode($Commands["DATA"])); } } if (!$fp) { //$w=socket_set_blocking(TRUE); //sleep(30); $w = fclose ($fp); } The problem is the socket works fine the first time, but the second time the script is run (~1 min between successive runs) the application gives this error. It seems to me the script is closing before it is done sending the data. I tried various socket timeouts, setting the blocking to true and false, and putting a pause in. Nothing seemed to work. Is it because only the script is sending data, I have not seen any PHP examples, where the script is the only side sending data. Thanks, Eric Levy