# Xmlsocket connection failed

**URL:** <https://forum.kirupa.com/t/xmlsocket-connection-failed/224329>\
**Category:** Uncategorized\
**Created:** [May 1, 2007, 10:14am UTC](https://forum.kirupa.com/t/xmlsocket-connection-failed/224329 "2007-05-01T10:14:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunjan](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@gunjan](https://forum.kirupa.com/u/gunjan)\
**Post date:** [May 1, 2007, 10:14am UTC](https://forum.kirupa.com/t/xmlsocket-connection-failed/224329/1 "2007-05-01T10:14:53Z")

</div>

Hi,  
I am learning about xmlsockets. I have tried the given example (flash 8 help)  
\*\*var theSocket:XMLSocket = new XMLSocket();  
theSocket.connect(“localhost”, 12345);

theSocket.onConnect = function(myStatus) {  
if (myStatus) {  
conn\_txt.text = “connection successful”;  
} else {  
conn\_txt.text = “no connection made”;  
}  
};  
\*\*  
it returns always no connection made, but when i am testing [http://localhost](http://localhost) in my browser it shows home page(i am using wamp server).  
I do not understand what the problem is please help me.

Thanks in advance  
Gunjan
