mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
ed83a28d3e
Support Unix domain sockets communication on Linux, MacOS and Android. Changes: 1. Add a field for InternetAddressType named unix. 2. Constructor of InternetAddress gains one more optional field: type. InternetAddress(String address, {InternetAddressType type}); 3. Add another constructor to InternetAddress which taks raw address/path for ip/unix addresses as an argument. InternetAddress.fromRawAddress(Uint8List rawAddress, {InternetAddressType type}); The operation for unix domain sockets communication is basically the same as normal sockets except an InternetAddress with type unix should be passed. Change-Id: I6a1135bbdd7f4e4fc745ccf8f95dec5272b6839b Bug: https://github.com/dart-lang/sdk/issues/21403 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125932 Commit-Queue: Zichang Guo <zichangguo@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
17 lines
551 B
C
17 lines
551 B
C
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_BIN_SOCKET_BASE_LINUX_H_
|
|
#define RUNTIME_BIN_SOCKET_BASE_LINUX_H_
|
|
|
|
#if !defined(RUNTIME_BIN_SOCKET_BASE_H_)
|
|
#error Do not include socket_base_linux.h directly. Use socket_base.h.
|
|
#endif
|
|
|
|
#include <arpa/inet.h>
|
|
#include <netdb.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/un.h>
|
|
|
|
#endif // RUNTIME_BIN_SOCKET_BASE_LINUX_H_
|