Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is it possible to send a tcp message with javascript?

Status
Not open for further replies.

MrCSharp

IS-IT--Management
Jun 7, 2005
59
CA
Javascript is not my specialty, so does any one know if you can send tcp messages with javascript.
 
Well...technically if you wanted to, you could probably fake it with an XMLHTTP object, though it might get kind of pissed with you. Say you want to it to talkj to port 23, just direct it to Now it's not really a raw socket connection, but you did manage to hit the port and transfer some info (HTTP headers, etc) :p

One (more realistic) option would be to have a page on the server that does the connection. You could use javascript and XMLHTTP to make queries back to the server, have the server-side pages do the socket work and return some data, then have the javascript output the result in some manner onto the page. Kind of AJAX meets sockets.

-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top