what is the difference between gen_tcp:recv and prim_inet recv
Asked Answered
S

1

1

What is prim_inet module , how it works ?
i tried to google it but i didn't find any useful docs.
i looked at the source file prim_inet.erl but nothing special there , dose prim_inet:async_recv spawn a new process for each recv ?

Searby answered 2/11, 2012 at 0:42 Comment(0)
D
5

You found no useful documentation because erlang modules that are internal and not meant to be directly called from applications aren't documented.

Please see "Why prim_inet undocumented. In that link you will read the following:

It is undocumented because it is an internal module that is not ment to be called from applications. Its interface may change without warning in even the smallest patch.

If there is functionality you need that is not provided in gen_tcp, gen_udp, gen_sctp, inet etc... you just ask about it and there may either be another way to do it, or it may be added to the public interface where it should be.

However, you might find prim_inet:async_accept/2 useful.

Discretional answered 2/11, 2012 at 0:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.