• Home
  • Raw
  • Download

Lines Matching refs:connection_id

103                           int connection_id,  in AcceptWebSocketCallback()  argument
106 connection_id_(connection_id), in AcceptWebSocketCallback()
210 bool CefServerImpl::IsValidConnection(int connection_id) { in IsValidConnection() argument
212 return connection_info_map_.find(connection_id) != connection_info_map_.end(); in IsValidConnection()
215 void CefServerImpl::SendHttp200Response(int connection_id, in SendHttp200Response() argument
219 SendHttp200ResponseInternal(connection_id, content_type, in SendHttp200Response()
223 void CefServerImpl::SendHttp404Response(int connection_id) { in SendHttp404Response() argument
226 connection_id)); in SendHttp404Response()
233 ConnectionInfo* info = GetConnectionInfo(connection_id); in SendHttp404Response()
239 << connection_id; in SendHttp404Response()
243 server_->Send404(connection_id, MISSING_TRAFFIC_ANNOTATION); in SendHttp404Response()
244 server_->Close(connection_id); in SendHttp404Response()
247 void CefServerImpl::SendHttp500Response(int connection_id, in SendHttp500Response() argument
251 connection_id, error_message)); in SendHttp500Response()
258 ConnectionInfo* info = GetConnectionInfo(connection_id); in SendHttp500Response()
264 << connection_id; in SendHttp500Response()
268 server_->Send500(connection_id, error_message, MISSING_TRAFFIC_ANNOTATION); in SendHttp500Response()
269 server_->Close(connection_id); in SendHttp500Response()
272 void CefServerImpl::SendHttpResponse(int connection_id, in SendHttpResponse() argument
279 connection_id, response_code, content_type, in SendHttpResponse()
287 ConnectionInfo* info = GetConnectionInfo(connection_id); in SendHttpResponse()
293 << connection_id; in SendHttpResponse()
311 server_->SendResponse(connection_id, response, MISSING_TRAFFIC_ANNOTATION); in SendHttpResponse()
313 server_->Close(connection_id); in SendHttpResponse()
317 void CefServerImpl::SendRawData(int connection_id, in SendRawData() argument
322 SendRawDataInternal(connection_id, CreateUniqueString(data, data_size)); in SendRawData()
325 void CefServerImpl::CloseConnection(int connection_id) { in CloseConnection() argument
328 base::BindOnce(&CefServerImpl::CloseConnection, this, connection_id)); in CloseConnection()
332 if (ValidateServer() && GetConnectionInfo(connection_id)) { in CloseConnection()
333 server_->Close(connection_id); in CloseConnection()
337 void CefServerImpl::SendWebSocketMessage(int connection_id, in SendWebSocketMessage() argument
342 SendWebSocketMessageInternal(connection_id, in SendWebSocketMessage()
347 int connection_id, in ContinueWebSocketRequest() argument
352 this, connection_id, request_info, allow)); in ContinueWebSocketRequest()
359 ConnectionInfo* info = GetConnectionInfo(connection_id); in ContinueWebSocketRequest()
372 server_->AcceptWebSocket(connection_id, request_info, in ContinueWebSocketRequest()
374 handler_->OnWebSocketConnected(this, connection_id); in ContinueWebSocketRequest()
376 server_->Close(connection_id); in ContinueWebSocketRequest()
381 int connection_id, in SendHttp200ResponseInternal() argument
386 this, connection_id, content_type, in SendHttp200ResponseInternal()
394 ConnectionInfo* info = GetConnectionInfo(connection_id); in SendHttp200ResponseInternal()
400 << connection_id; in SendHttp200ResponseInternal()
404 server_->Send200(connection_id, *data, content_type, in SendHttp200ResponseInternal()
406 server_->Close(connection_id); in SendHttp200ResponseInternal()
409 void CefServerImpl::SendRawDataInternal(int connection_id, in SendRawDataInternal() argument
413 connection_id, std::move(data))); in SendRawDataInternal()
420 if (!GetConnectionInfo(connection_id)) in SendRawDataInternal()
423 server_->SendRaw(connection_id, *data, MISSING_TRAFFIC_ANNOTATION); in SendRawDataInternal()
427 int connection_id, in SendWebSocketMessageInternal() argument
432 connection_id, std::move(data))); in SendWebSocketMessageInternal()
439 ConnectionInfo* info = GetConnectionInfo(connection_id); in SendWebSocketMessageInternal()
445 << connection_id; in SendWebSocketMessageInternal()
449 server_->SendOverWebSocket(connection_id, *data, MISSING_TRAFFIC_ANNOTATION); in SendWebSocketMessageInternal()
452 void CefServerImpl::OnConnect(int connection_id) { in OnConnect() argument
455 CreateConnectionInfo(connection_id); in OnConnect()
456 handler_->OnClientConnected(this, connection_id); in OnConnect()
460 int connection_id, in OnHttpRequest() argument
464 ConnectionInfo* info = GetConnectionInfo(connection_id); in OnHttpRequest()
471 handler_->OnHttpRequest(this, connection_id, request_info.peer.ToString(), in OnHttpRequest()
476 int connection_id, in OnWebSocketRequest() argument
480 ConnectionInfo* info = GetConnectionInfo(connection_id); in OnWebSocketRequest()
491 new AcceptWebSocketCallback(this, connection_id, request_info); in OnWebSocketRequest()
493 this, connection_id, request_info.peer.ToString(), in OnWebSocketRequest()
497 void CefServerImpl::OnWebSocketMessage(int connection_id, std::string data) { in OnWebSocketMessage() argument
500 ConnectionInfo* info = GetConnectionInfo(connection_id); in OnWebSocketMessage()
507 handler_->OnWebSocketMessage(this, connection_id, data.data(), data.size()); in OnWebSocketMessage()
510 void CefServerImpl::OnClose(int connection_id) { in OnClose() argument
513 RemoveConnectionInfo(connection_id); in OnClose()
514 handler_->OnClientDisconnected(this, connection_id); in OnClose()
634 int connection_id) { in CreateConnectionInfo() argument
639 connection_info_map_.find(connection_id); in CreateConnectionInfo()
645 std::make_pair(connection_id, base::WrapUnique(info))); in CreateConnectionInfo()
650 int connection_id) const { in GetConnectionInfo()
653 connection_info_map_.find(connection_id); in GetConnectionInfo()
657 LOG(ERROR) << "Invalid connection_id " << connection_id; in GetConnectionInfo()
661 void CefServerImpl::RemoveConnectionInfo(int connection_id) { in RemoveConnectionInfo() argument
663 ConnectionInfoMap::iterator it = connection_info_map_.find(connection_id); in RemoveConnectionInfo()