anchor.diff:  proto2module(udp)  -> sipsocket_udp;
   proto2module(udp6) -> sipsocket_udp.
       
  -proto2viastr(Socket) when record(Socket, sipsocket) ->
  +proto2viastr(Socket) when is_record(Socket, sipsocket) ->
       proto2viastr(Socket#sipsocket.proto);
   proto2viastr(tcp)  -> "SIP/2.0/TCP";
   proto2viastr(tcp6) -> "SIP/2.0/TCP";
  
positive.code: %%           Res = term(), result of apply() but typically a
  %%                         sipsocket record()
  %%--------------------------------------------------------------------
  get_socket(Module, Proto, Host, Port) when atom(Module), atom(Proto), list(Port) ->
      get_socket(Module, Proto, Host, list_to_integer(Port));
  get_socket(Module, Proto, Host, Port) when atom(Module), atom(Proto) ->
      apply(Module, get_socket, [Proto, Host, Port]).
  
  %%--------------------------------------------------------------------
  %% Function: is_reliable_transport(Socket)
  
negative.code: %%           Res = term(), result of apply() but typically
  %%                         ok | {error, E}
  %%--------------------------------------------------------------------
  send(Socket, Proto, Host, Port, Message) when is_record(Socket, sipsocket), is_atom(Proto),
  					      is_list(Host), is_integer(Port) ->
      SipSocketM = Socket#sipsocket.module,
      SipSocketM:send(Socket, Proto, Host, Port, Message).
  
  %%--------------------------------------------------------------------
  %% Function: get_socket(Module, Proto, Host, Port)
  %%           Module = atom()
  %%           Proto  = atom(), (at least tcp | tcp6 | udp | udp6 | tls)
  %%           Host   = string()
  %%           Port   = integer()
  %% Descrip.: Get a socket, cached or new, useable to send messages to
  %%           Host on port Port using protocol Proto from sipsocket
  %%           module Module.
  