anchor.diff:  	netstring:decode(Packet, Continuation).
   
   envelope_to_json(Envelope) ->
  -	Props = [{<<"type">>, Envelope#envelope.type},
  -		{<<"channel">>, Envelope#envelope.channel},
  -		{<<"contents">>, Envelope#envelope.contents}
  +	#envelope{type = Type, channel = Channel, contents = Contents, id = Id} = Envelope,
  +	Props = [{<<"type">>, Type},
  +		{<<"channel">>, Channel},
  +		{<<"contents">>, Contents}
   	],
  -	case Envelope#envelope.id of
  +	case Id of
   		undefined -> {struct, Props};
   		Id -> {struct, [{<<"id">>, Id} | Props]}
   	end.
  
positive.code: 	Type = proplists:get_value(<<"type">>, Props, <<>>),
  	Type0 = check_envelope_type(Type),
  	Id = proplists:get_value(<<"id">>, Props),
  	Content = proplists:get_value(<<"contents">>, Props),
  	Channel = proplists:get_value(<<"channel">>, Props),
  	#envelope{type = Type0, id = Id, contents = Content, channel = Channel}.
  
  check_envelope_type(<<"request">>) -> request;
  check_envelope_type(<<"response">>) -> response;
  
negative.code: %% API Function Exports
  %% ------------------------------------------------------------------
  
  -export([start_link/2,start/2,udp/2,set_tcp/5,send/5,json_to_envelope/1]).
  
  %% ------------------------------------------------------------------
  %% gen_server Function Exports
  