Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey,

I want to ask how i could send data to a specific port (like 1273) with javascript?

My project is an extension for google chrome which should be written in javascript and it should be able to send data to a port, like i've mentioned above.
Posted

send ajax request with jQuery for example.
jQuery.get( "http://localhost:25644", {}, function(data){ ... do something },'json');
don't forget to handle error (socket errors when the client is not responding).
 
Share this answer
 
If the browser supports html5 you can use WebSockets, google for more info and examples.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900