Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between udp(4) and udp(6)?

Tags:

node.js

udp

Can somebody go over the syntax differences and possible use case differences between udp(4) and udp(6)?

I noticed there is a difference marked in the Node documentation when creating a datagram socket.

like image 563
DaBuj Avatar asked May 19 '14 18:05

DaBuj


1 Answers

The only difference is as Mat mentioned that udp6 uses IPv6 and udp4 uses IPv4. The type parameter you specify when creating a socket indicates which interface will be used. The rest of the API is the same.

like image 129
Adam Reis Avatar answered Oct 12 '22 16:10

Adam Reis