funbox / smppex

✉️ SMPP 3.4 protocol and framework implementation in Elixir
MIT License
106 stars 34 forks source link

Process name for SMPPEX.ESME.start_link #57

Closed sergey-chechaev closed 5 years ago

sergey-chechaev commented 5 years ago

Can we add process name toSMPPEX.ESME.start_link like in GenServer:

# Start the server and register it locally with name MyStack
{:ok, _} = GenServer.start_link(Stack, [:hello], name: MyStack)

# Now messages can be sent directly to MyStack
GenServer.call(MyStack, :pop)
#=> :hello

Now if we need to add a process name for SMPPEX.Session we add Process.register to callback init. It is not very convenient.

savonarola commented 5 years ago

Hello! Yes, it's a common convention to pass option keyword list from start_link to the underlying GenServer.start_link call.

But actually SMPP session processes are not started with GenServer.start_link.

Wouldn't it be then confusing to «emulate» some of GenServer options?

savonarola commented 5 years ago

Closing due to inactivity.