# megaco_udp

### MODULE

megaco_udp

### MODULE SUMMARY

Interface module to UDP transport protocol for Megaco/H.248.

### DESCRIPTION

This module contains the public interface to the UDP/IP version transport protocol for Megaco/H.248.

### EXPORTS

`start_transport() -> {ok, TransportRef}`

Types:

`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}`

Types:

`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.

`close(Handle, Msg) -> ok`

Types:

`Handle = socket_handle()`
`Msg`

This function is used for closing an active UDP socket.

`socket(Handle) -> Socket`

Types:

`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()`

Types:

`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`

Types:

`SendHandle = send_handle()`
`Message = binary() | iolist()`

Sends a message on a socket. The send handle is obtained by megaco_udp:create_send_handle/3

`block(Handle) -> ok`

Types:

`Handle = socket_handle()`

Stop receiving incoming messages on the socket.

`unblock(Handle) -> ok`

Types:

`Handle = socket_handle()`

Starting to receive incoming messages from the socket again.

### AUTHORS

Lars Thorsén - support@erlang.ericsson.se

megaco 1.0.3
Copyright © 1991-2002 Ericsson Utvecklings AB