Hacker News new | ask | show | jobs
by OkayPhysicist 1159 days ago
What's the benefit of a port driver over a NIF?
1 comments

A port driver can participate in the BEAM event loop, adding filehandles that get called back when they're ready.

It's a more appropriate choice for something that's asynchronous, although NIFs do have ways to fill the same role. A port driver would probably be a better choice for specalty networking that ERTS doesn't provide (raw packets? netgraph, etc).