19#define DART_CHECK_ERROR_AND_CLEANUP(handle, ptr) \
21 if (Dart_IsError((handle))) { \
23 Dart_SetReturnValue(args, (handle)); \
28#define DART_CHECK_ERROR(handle) \
30 if (Dart_IsError((handle))) { \
31 Dart_SetReturnValue(args, (handle)); \
64 if (addresses ==
nullptr) {
72 for (intptr_t
i = 0;
i < addresses->
count();
i++) {
129 "First parameter must be a List<int>"));
135 uint8_t*
buffer =
nullptr;
138 reinterpret_cast<void**
>(&
buffer), &
len);
142 intptr_t bytes_written =
145 if (bytes_written >= 0) {
162 "First parameter must be a List<int>"));
167 intptr_t array_len = 0;
174 if (bytes_read < 0) {
178 if (bytes_read > 0) {
192 if (available >= 0) {
219 "First parameter must be an integer."));
222 uint8_t*
buffer =
nullptr;
230 if (bytes_read ==
length) {
232 }
else if (bytes_read > 0) {
233 uint8_t* new_buffer =
nullptr;
239 ASSERT(new_buffer !=
nullptr);
240 memmove(new_buffer,
buffer, bytes_read);
242 }
else if (bytes_read == -1) {
287 if (
addr ==
nullptr) {
318 if (socket->
fd() >= 0) {
344 ASSERT(socket !=
nullptr);
352 if (*socket ==
nullptr) {
#define FUNCTION_NAME(name)
T * GetAt(intptr_t i) const
static int64_t GetInt64ValueCheckRange(Dart_Handle value_obj, int64_t lower, int64_t upper)
static Dart_Handle NewDartOSError()
static bool GetInt64Value(Dart_Handle value_obj, int64_t *value)
static Dart_Handle NewDartArgumentError(const char *message)
static Dart_Handle NewInternalError(const char *message)
static intptr_t GetIntptrValue(Dart_Handle value_obj)
static Dart_Handle Allocate(intptr_t size, uint8_t **buffer)
static void GetSockAddr(Dart_Handle obj, RawAddr *addr)
static void SetAddrPort(RawAddr *addr, intptr_t port)
static Dart_Handle ToTypedData(const RawAddr &addr)
static AddressList< SocketAddress > * LookupAddress(const char *host, int type, OSError **os_error)
static SocketAddress * GetRemotePeer(intptr_t fd, intptr_t *port)
static intptr_t Available(intptr_t fd)
static Dart_Handle GetSocketIdNativeField(Dart_Handle socket_obj, SynchronousSocket **socket)
static intptr_t CreateConnect(const RawAddr &addr)
static void ShutdownRead(intptr_t fd)
static void Close(intptr_t fd)
static intptr_t Read(intptr_t fd, void *buffer, intptr_t num_bytes)
static intptr_t Write(intptr_t fd, const void *buffer, intptr_t num_bytes)
static intptr_t GetPort(intptr_t fd)
static void ShutdownWrite(intptr_t fd)
static Dart_Handle SetSocketIdNativeField(Dart_Handle handle, SynchronousSocket *socket)
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const uint8_t uint32_t uint32_t GError ** error
void FUNCTION_NAME() SynchronousSocket_Available(Dart_NativeArguments args)
static constexpr int kSocketIdNativeField
void FUNCTION_NAME() SynchronousSocket_GetRemotePeer(Dart_NativeArguments args)
static void SynchronousSocketFinalizer(void *isolate_data, void *data)
void FUNCTION_NAME() SynchronousSocket_WriteList(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_GetPort(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_ShutdownRead(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_Read(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_LookupRequest(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_ReadList(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_CreateConnectSync(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_ShutdownWrite(Dart_NativeArguments args)
void FUNCTION_NAME() SynchronousSocket_CloseSync(Dart_NativeArguments args)
DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args, int arg_index, void **peer)
DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, int index, intptr_t *value)
DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, bool retval)
DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception)
DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value)
DART_EXPORT void Dart_PropagateError(Dart_Handle handle)
DART_EXPORT Dart_FinalizableHandle Dart_NewFinalizableHandle(Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
DART_EXPORT uint8_t * Dart_ScopeAllocate(intptr_t size)
DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, Dart_Handle retval)
DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, Dart_TypedData_Type *type, void **data, intptr_t *len)
DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list, intptr_t index, Dart_Handle value)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, int index, intptr_t value)
DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, int64_t retval)
DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, intptr_t offset, const uint8_t *native_array, intptr_t length)
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t *len)
DART_EXPORT Dart_Handle Dart_NewList(intptr_t length)
DART_EXPORT bool Dart_IsList(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_GetNativeIntegerArgument(Dart_NativeArguments args, int index, int64_t *value)
DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
static int8_t data[kExtLength]
DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle object, const char **cstr)
DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char *str)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service host
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
#define DART_CHECK_ERROR(handle)
#define DART_CHECK_ERROR_AND_CLEANUP(handle, ptr)