简体   繁体   中英

How do I send a message to my socket.io websocket from the command line in Windows 10?

Using Node.js and Socket.io I would like to communicate with a webpage via the command line in Windows 10. I am new to Node.js and think it is possible. The real goal is to send JavaScript functions that usually are sent by buttons on a web page. I don't use the command line much so if you suggest don't worry about being very explicit. Thanks

If I did not misunderstand you, you can use wscat, just install it globally and you can connect to a websocket as if it were a client from the command line

wscat https://www.npmjs.com/package/wscat

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM