Flutter Engine
flutter::IsolateNameServer Class Reference

#include <isolate_name_server.h>

Public Member Functions

 IsolateNameServer ()
 
 ~IsolateNameServer ()
 
Dart_Port LookupIsolatePortByName (const std::string &name)
 
bool RegisterIsolatePortWithName (Dart_Port port, const std::string &name)
 
bool RemoveIsolateNameMapping (const std::string &name)
 

Detailed Description

Definition at line 17 of file isolate_name_server.h.

Constructor & Destructor Documentation

◆ IsolateNameServer()

flutter::IsolateNameServer::IsolateNameServer ( )

Definition at line 9 of file isolate_name_server.cc.

References ~IsolateNameServer().

9 {}

◆ ~IsolateNameServer()

flutter::IsolateNameServer::~IsolateNameServer ( )
default

Referenced by IsolateNameServer().

Member Function Documentation

◆ LookupIsolatePortByName()

Dart_Port flutter::IsolateNameServer::LookupIsolatePortByName ( const std::string &  name)

Definition at line 13 of file isolate_name_server.cc.

References name.

13  {
14  std::scoped_lock lock(mutex_);
15  return LookupIsolatePortByNameUnprotected(name);
16 }
const char * name
Definition: fuchsia.cc:50

◆ RegisterIsolatePortWithName()

bool flutter::IsolateNameServer::RegisterIsolatePortWithName ( Dart_Port  port,
const std::string &  name 
)

Definition at line 27 of file isolate_name_server.cc.

References name, and flutter::port.

28  {
29  std::scoped_lock lock(mutex_);
30  if (LookupIsolatePortByNameUnprotected(name) != ILLEGAL_PORT) {
31  // Name is already registered.
32  return false;
33  }
34  port_mapping_[name] = port;
35  return true;
36 }
DEF_SWITCHES_START snapshot asset Path to the directory containing the four files specified by VmSnapshotInstructions and IsolateSnapshotInstructions vm snapshot The VM instructions snapshot that will be memory mapped as read and executable SnapshotAssetPath must be present isolate snapshot The isolate instructions snapshot that will be memory mapped as read and executable SnapshotAssetPath must be present icu symbol Prefix for the symbols representing ICU data linked into the Flutter library dart Flags passed directly to the Dart VM without being interpreted by the Flutter shell observatory port
Definition: switches.h:75
const char * name
Definition: fuchsia.cc:50

◆ RemoveIsolateNameMapping()

bool flutter::IsolateNameServer::RemoveIsolateNameMapping ( const std::string &  name)

Definition at line 38 of file isolate_name_server.cc.

38  {
39  std::scoped_lock lock(mutex_);
40  auto port_iterator = port_mapping_.find(name);
41  if (port_iterator == port_mapping_.end()) {
42  return false;
43  }
44  port_mapping_.erase(port_iterator);
45  return true;
46 }
const char * name
Definition: fuchsia.cc:50

The documentation for this class was generated from the following files: