开发者

TCP client in JavaScript

开发者 https://www.devze.com 2023-02-17 21:19 出处:网络
I am a newbie to java scripting, hence need help. I am looking for a tcp client code written in java script that constantly reads data from a server socke开发者_开发问答t and prints to the console. An

I am a newbie to java scripting, hence need help. I am looking for a tcp client code written in java script that constantly reads data from a server socke开发者_开发问答t and prints to the console. Any help is highly appreciated.thanks


What environment is the Javascript client?

If it's in a browser, you can't do it, there's no support for generic TCP sockets in browsers.

However you might be able to use a WebSocket if you're using a newer browser that supports them.

0

精彩评论

暂无评论...
验证码 换一张
取 消