I’m using SMPPEX library that requires SMPPEX.ESME.start_link
to create a session, it returns {:ok, pid}
. As part of the parameters to start_link
, it takes a module name, however unlike a GenServer etc, there’s no way AFAIK to associate the module name with the pid
I was wondering if I could store associate the pid with the module using something like Registry so I can subsequently do a lookup for the pid
. Some library functions requires the pid
to work and attempt to pass the module name fails.
How do I associate a name with pid
using Registry.
I’m also aware of the Process dictionary, I’m not sure if it’s the right thing to do by using put
or register
and retrieving it later.