anchor.diff:  set_tcp(Pid, Socket, Message, Bins, Cont) ->
   	gen_server:cast(Pid, {set_tcp, Socket, Message, Bins, Cont}).
   
  -send(Pid, Socket, Binary) when Socket == udp; Socket == ssl; Socket == tcp ->
  -	gen_server:cast(Pid, {send, Socket, Binary}).
  -
  -send_tcp(Pid, Binary) -> send(Pid, tcp, Binary).
  -
  -send_udp(Pid, Binary) -> send(Pid, udp, Binary).
  -
  -send_ssl(Pid, Binary) -> send(Pid, ssl, Binary).
  +-spec(send/5 :: (Pid :: pid(), Socket :: 'udp' | 'ssl' | 'tcp', Type :: 'request' | {'response', message_id()}
  +		| 'event' | {'request', message_id()}, Channel :: binary(), Json :: json()) -> 'ok' | message_id()).
  +send(Pid, Socket, request, Channel, Json) when Socket == udp; Socket == ssl; Socket == tcp ->
  +	Id = generate_id(),
  +	send(Pid, Socket, {request, Id}, Channel, Json),
  +	Id;
  +
  +send(Pid, Socket, Type, Channel, Json) when Socket == udp; Socket == ssl; Socket == tcp ->
  +	gen_server:cast(Pid, {send, Socket, Type, Channel, Json}).
   
   %% ------------------------------------------------------------------
   %% gen_server Function Definitions
  
positive.code: %% API Function Exports
  %% ------------------------------------------------------------------
  
  -export([start_link/2,start/2,udp/2,set_tcp/5,send/3,send_tcp/2,send_ssl/2,
  	send_udp/2,json_to_envelope/1]).
  
  %% ------------------------------------------------------------------
  %% gen_server Function Exports
  
negative.code: %% handle_cast
  %% ------------------------------------------------------------------
  
  handle_cast({send, tcp, Type, Channel, Json}, #state{tcp_socket = undefined} = State) ->
  	?warning("Tried to send ~p message for channel ~p over TCP before getting TCP sync info: ~p", [Type, Channel, Json]),
  	{noreply, State};
  
  handle_cast({send, tcp, Type, Channel, Json}, State) ->
  	Bin = build_message(Type, Channel, Json),
  	gen_tcp:send(State#state.tcp_socket, Bin),
  	{noreply, State};
  
  handle_cast({send, ssl, Type, Channel, Json}, State) ->
  	Bin = build_message(Type, Channel, Json),
  	ssl:send(State#state.ssl_socket, Bin),
  	{noreply, State};
  
  handle_cast({send, udp, Type, Channel, Json}, #state{udp_remote_info = undefined} = State) ->
  	?warning("Tried to send ~p message for channel ~p over UDP before getting TCP sync info: ~p", [Type, Channel, Json]),
  	{noreply, State};
  
  handle_cast({send, udp, Type, Channel, Json}, State) ->
  	#state{udp_socket = Sock, udp_remote_info = {Ip, Port}} = State,
  	Bin = build_message(Type, Channel, Json),
  	gen_udp:send(Sock, Ip, Port, Bin),
  	{noreply, State};
  
  handle_cast({set_tcp, Socket, Message, Bins, Cont}, State) ->
  