anchor.diff:  		X when is_record(X, event) ->
   			Base#envelope{event = X}
   	end,
  -	?debug("ksending:  ~p", [OutRec]),
   	netstring:encode(precursors_pb:encode(OutRec)).
  
positive.code: 	?info("starting authentication"),
  	% TODO actually ask an authentication system if they should be let in.
  	#request{id = ReqId} = Request,
  	Cookie = lists:flatten(io_lib:format("~p", [erlang:make_ref()])),
  	#state{udp_socket = UdpSocket} = State,
  	{ok, UdpPort} = inet:port(UdpSocket),
  	LoginRep = #loginreply{
  
negative.code: 	},
  	OutBin = wrap_for_send("control", Response),
  	SendRes = ssl:send(State#state.ssl_socket, OutBin),
  	?debug("authentiation ssl:send result:  ~p", [SendRes]),
  	State#state{cookie = Cookie, tcp_socket = Cookie,
  		udp_remote_info = Cookie
  	}.
  