Module sipsocket_test

Sipsocket test module, fakes network communication to make it possible to test other modules.

Introduced in: 18 Jul 2005 by Fredrik Thulin <ft@it.su.se>

Behaviours: sipsocket.

Authors: Fredrik Thulin (ft@it.su.se).

Description

Sipsocket test module, fakes network communication to make it possible to test other modules.

Function Index

close_socket/1 Fake response based on process dictionary.
get_raw_socket/1 Return a fake raw socket or a term based on process dict.
get_remote_peer/1 Return fake remote peer info based on process dictionary.
get_socket/1 Return a fake socket or a term based on process dict.
get_specific_socket/1 Return a fake socket or a term based on process dict.
is_reliable_transport/1 Fake response based on process dictionary.
send/5 Fake sending Message to Host:Port.
start_link/0 Would've done some useful initialization if this was not merely a test module.

Function Details

close_socket/1

close_socket(Sipsocket::SipSocket) -> ok | {error, Reason}

Fake response based on process dictionary.

get_raw_socket/1

get_raw_socket(Sipsocket::SipSocket) -> #sipsocket{} | term()

Return a fake raw socket or a term based on process dict.

get_remote_peer/1

get_remote_peer(Sipsocket::SipSocket) -> {ok, Proto, Addr, Port} | term()

Return fake remote peer info based on process dictionary.

get_socket/1

get_socket(Sipdst::Dst) -> #sipsocket{} | term()

Return a fake socket or a term based on process dict.

get_specific_socket/1

get_specific_socket(Ob_id::Id) -> #sipsocket{} | term()

Return a fake socket or a term based on process dict.

is_reliable_transport/1

is_reliable_transport(Sipsocket::SipSocket) -> true | false

Fake response based on process dictionary.

send/5

send(SipSocket, Proto, Host, Port, Message) -> ok | {error, Reason}

Fake sending Message to Host:Port. Return failure or success based on process dictionary.

start_link/0

start_link() -> ignore

Would've done some useful initialization if this was not merely a test module.


Generated by EDoc, Oct 17 2007, 16:48:21.