AJAX working as a TCP/IP connection

Michael Schwarz on Friday, October 21, 2005

Today I have finished a working demonstration using AJAX as a TCP connection. With that demonstration you can use a HTTP connection as a real TCP/IP connection:

<script type="text/javascript">

function OnReceive(data) { alert(data); }

var r = new AjaxPro.Web.Connection("/ajaxpro/tcp.ashx"); r.ondata = OnReceive; r.open();

r.send("USER michael");

// ...

</script>

With that demonstration code I could use the HTTP connection i.e. as a connection to get my emails (using POP3 protocol, on the server I hold a TCP/IP connection to my mail server). I will do some more tests later and put the source code and a working web site online. Your comment... [1]!