Introduced in: 15 Dec 2003 by Fredrik Thulin <ft@it.su.se>
Behaviours: gen_server.
Authors: Fredrik Thulin (ft@it.su.se).
Transportlayer UDP all-in-one handler. Receive UDP datagrams and, if they are not keep alives (or too short), spawn sipserver:process(...) on the received packets. Send packets using either our IPv4 or our IPv6 socket.
Note : This module should be split in two, one server process and one interface module which can be a sipsocket behaviour module, like the TCP sipsocket code.
Note : Our UDP code does not support multiple interfaces correctly. We should get one socket per interface (and protocol), to be able to implement RFC3581 (rport) correctly.state() = #state{}
no description
close_socket/1 | Close a socket. |
get_raw_socket/1 | Get the raw TCP/UDP/TLS socket from the socket handler. |
get_remote_peer/1 | UDP sockets don't have a remote peer. |
get_socket/1 | Return a socket suitable for communicating with this dst. |
get_specific_socket/1 | Return a specific socket. |
is_reliable_transport/1 | No UDP protocol is reliable transport. |
send/5 | Send Message to Host:Port. |
start_link/0 | Starts the server. |
close_socket(Sipsocket::SipSocket) -> ok | {error, Reason}
Close a socket.
get_raw_socket(Sipsocket::Socket) -> {ok, RawSocket} | {error, Reason}
Get the raw TCP/UDP/TLS socket from the socket handler. Be careful with what you do with the raw socket - don't use it for sending/receiving for example. Intended for use in extractin certificate information of an SSL socket or similar.
get_remote_peer(Sipsocket::SipSocket) -> not_applicable
UDP sockets don't have a remote peer.
get_socket(Sipdst::Dst) -> SipSocket | {error, Reason}
Return a socket suitable for communicating with this dst.
get_specific_socket(Ob_id::Id) -> SipSocket | {error, Reason}
Return a specific socket. Used by draft-Outbound implem- entation to send requests using an existing flow, or not at all.
is_reliable_transport(Sipsocket::SipSocket) -> false
No UDP protocol is reliable transport. Return false.
send(SipSocket, Proto, Host, Port, Message) -> Result | {error, Reason}
Send Message to Host:Port. Proto must currently be the same protocol as is stored in SipSocket.
start_link() -> term()
Starts the server
Generated by EDoc, Oct 17 2007, 16:48:21.