Penguin

Differences between current version and previous revision of ECONNREFUSED.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Saturday, December 4, 2004 2:40:26 am by PerryLorier
Older page: version 1 Last edited on Sunday, February 23, 2003 1:32:00 am by KevinGeorge Revert
@@ -3,4 +3,6 @@
 You would usually run into this when attempting to use connect(2) a socket(2). 
 "Connection refused" means that the remote host rejected your connection attempt. 
 This usually means that the host was not listening on the port you attempted to 
 connect on, or there is a firewall preventing you from connecting to that port. 
+  
+You can get this on connectionless protocols such as [UDP] if the protocol returned an [ICMP] error message such as DestinationPortUnreachable. Note that because [UDP] is connectionless the nexttime you send(2)/recv(2) a packet on the same socket you may get the error, not immediately when you send the packet. Thus if you get this error from send(2) (or recv(2)) then it is likely that the packet you __just__ sent was fine, but one of the packets you sent earlier returned an error message, however it's impossible to tell which packet exactly it was (unless you open a new socket per packet...)