Use GenSever to automatically initiate a function/ Connection

hello, i am new to elixir and want to initiate a connection to a server(_not local) upon starting the project. i want use GenSever.

its an smpp project. but i want this connection to but automatically initiated when i start running the project

current function to connect

defmodule Receiver do
def init_req(connect) do
:esmpp.start_link(connect)
end

#my conection details

connect = %{
mode: :transceiver,
host: ‘xxx.xx.x.x’,
port: xxxx,
system_id: ‘xxx’,
password: ‘xxxxxxx’,
callback_mo: {Receiver, :handle_incoming_pdu},
callback_dr: {Receiver, :handle_delivery_pdu}
}

end
#bind connection

iex> {_, pid} = Receiver.init_req(connect)

Hi Vincent, what is your question? What issue did you run into?

@benwilson512 no issues yet. some sort of template on how i can implement, the GenSever to pick a particular function. i posted the question before doing some research. i am currently running some trails. ill reply with the errors if i get any

OK, you posted this to the “Questions / Help” category so the assumption is that you have a question or you need help. If you do not have a question and do not need help you may want to articulate the point of your post more clearly.

at the point i needed a struct on how i could implement that connection