In this guide, we will discuss Erlang Ports. Returns a list of all ports on the local node.
Syntax
ports()
Parameters
- None
Return Value
Returns a list of all ports on the local node.
For example
-module(helloworld). -export([start/0]). start() -> io:fwrite("~w~n",[erlang:ports()]).
Output
When we run the above program we will get the following result. Depending on the system, the output will differ.
[#Port<0.0>,#Port<0.49>,#Port<0.383>,#Port<0.392>]
Next Topic : Click Here
Pingback: Erlang - now | Adglob Infosystem Pvt Ltd
Pingback: Erlang - BIFS | Adglob Infosystem Pvt Ltd