This module contains the public interface to the UDP/IP version transport protocol for Megaco/H.248.
start_transport() -> {ok, TransportRef}
TransportRef = pid()This function is used for starting the UDP/IP transport service. Use exit(TransportRef, Reason) to stop the transport service.
open(TransportRef, OptionList) -> {ok, Handle, ControlPid} |
{error, Reason}
TransportRef = pid() | regname()OptionList = [Option]Option = {port, integer()}
|{options, list()}
|{receive_handle, term()}Handle = socket_handle()ControlPid = pid()Reason = term()This function is used for open an UDP/IP socket.
Handle = socket_handle()MsgThis function is used for closing an active UDP socket.
Handle = socket_handle()Socket = inet_socket()This function is used to convert a socket_handle() to a inet_socket(). inet_socket() is a plain socket, see the inet module for more info.
create_send_handle(Handle, Host, Port) -> send_handle()
Handle = socket_handle()Host = {A,B,C,D} | string()Port = integer()Creates a send handle from a transport handle. The send handle is intended to be used by megaco_udp:send_message/2.
send_message(SendHandle, Msg) -> ok
SendHandle = send_handle()Message = binary() | iolist()Sends a message on a socket. The send handle is obtained by megaco_udp:create_send_handle/3
Handle = socket_handle()Stop receiving incoming messages on the socket.
Handle = socket_handle()Starting to receive incoming messages from the socket again.