简体   繁体   中英

Use custom transport layer protocol in Node.js

I've wanted to experiment with creating a transport layer protocol in Node.js, but I couldn't find anything in the documentation used to interact directly with the IP protocol. I tried skimming through the code for the implementation of UDP to no avail. Can anyone lead me in the right direction?

You will need to create a c++/c module for Node, as node does not expose an API for accessing raw sockets.

There is a npm package that can do this for you. https://www.npmjs.com/package/raw-socket

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