anchor.diff:  	{noreply, State};
   	
   handle_cast({set_tcp, Socket, Message, Bins, Cont}, State) ->
  -	Success = handle_connect_message(Message, State),
  -	case Success of
  -		ok ->
  -			?info("TCP port sync up!");
  -		Else ->
  -			?error("Error handling TCP connect message:  ~p", [Else])
  -	end,
  +	% Respond to connect message
  +	confirm_connect_message(Message, State),
  +	% Update state and handle any remaining requests
   	State1 = State#state{tcp_socket = Socket, tcp_netstring = Cont},
   	NewState = service_requests(Bins, State1),
   	{noreply, NewState};
  
positive.code: 				end;
  			_ -> badrequest
  		end end,
  		% Send response over SSL transport
  		ConnectRep = {struct, [
  			{confirm, true}
  		]},
  		Response = #envelope{type = response, channel = <<"control">>, id = MsgID, contents = ConnectRep},
  		OutBin = wrap_for_send(Response),
  		SendRes = ssl:send(SSLSocket, OutBin),
  		?debug("Connect response ssl:send result:  ~p", [SendRes])
  	catch
  		What:Why ->
  			{What,Why}
  	end.
  
  %% ------------------------------------------------------------------
  %% Tests
  
negative.code: %% ------------------------------------------------------------------
  
  handle_connect_message(Message, State) ->
  	#state{cookie = Cookie} = State,
  	try begin
  		#envelope{type = request, channel = <<"control">>, contents = {struct, Request}} = Message,
  		case proplists:get_value(<<"type">>, Request) of
  			<<"connect">> ->
  				case proplists:get_value(<<"cookie">>, Request) of
  