- *
+ *
* @author Christian Kohlschütter (documentation credits to Jon Maloy and the TIPC team).
*/
public final class AFTIPCSocketAddress extends AFSocketAddress {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L; // do not change!
private static final Pattern PAT_TIPC_URI_HOST_AND_PORT = Pattern.compile(
"^((?:(?:(?cluster|node|default|[0-9a-fx]+)\\-)?(?service|service-range|socket)\\.)|"
@@ -131,7 +131,7 @@ public final class AFTIPCSocketAddress extends AFSocketAddress {
/**
* The TIPC address type.
- *
+ *
* @author Christian Kohlschütter
*/
@NonNullByDefault
@@ -191,7 +191,7 @@ interface DebugStringProvider extends Serializable {
/**
* Formats an integer as an unsigned, zero-padded 32-bit hexadecimal number.
- *
+ *
* @param i The number.
* @return The string.
*/
@@ -211,7 +211,7 @@ private String toDebugString(Scope scope, int a, int b, int c) {
/**
* The TIPC visibility scope.
- *
+ *
* @author Christian Kohlschütter
*/
@NonNullByDefault
@@ -249,7 +249,7 @@ private Scope(String name, int id) {
/**
* Returns a {@link Scope} instance given an integer value.
- *
+ *
* @param v The scope value.
* @return The {@link Scope} instance.
*/
@@ -263,6 +263,12 @@ private AFTIPCSocketAddress(int port, final byte[] socketAddress, ByteBuffer nat
super(port, socketAddress, nativeAddress, addressFamily());
}
+ private static AFTIPCSocketAddress newAFSocketAddress(int port, final byte[] socketAddress,
+ ByteBuffer nativeAddress) throws SocketException {
+ return newDeserializedAFSocketAddress(port, socketAddress, nativeAddress, addressFamily(),
+ AFTIPCSocketAddress::new);
+ }
+
/**
* Returns an {@link AFTIPCSocketAddress} that refers to a given service type and instance, using
* the given scope.
@@ -294,7 +300,7 @@ public static AFTIPCSocketAddress ofService(int type, int instance) throws Socke
/**
* Returns an {@link AFTIPCSocketAddress} that refers to a given service type and instance, using
* the given scope and the given lookup domain.
- *
+ *
* @param scope The address scope.
* @param type The service type (0-63 are reserved).
* @param instance The service instance ID.
@@ -434,7 +440,7 @@ private static int parseUnsignedInt(String v) {
/**
* Returns an {@link AFTIPCSocketAddress} given a special {@link InetAddress} that encodes the
* byte sequence of an AF_TIPC socket address, like those returned by {@link #wrapAddress()}.
- *
+ *
* @param address The "special" {@link InetAddress}.
* @param port The port (use 0 for "none").
* @return The {@link AFTIPCSocketAddress} instance.
@@ -449,7 +455,7 @@ public static AFTIPCSocketAddress unwrap(InetAddress address, int port) throws S
* Returns an {@link AFTIPCSocketAddress} given a special {@link InetAddress} hostname that
* encodes the byte sequence of an AF_TIPC socket address, like those returned by
* {@link #wrapAddress()}.
- *
+ *
* @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}.
* @param port The port (use 0 for "none").
* @return The {@link AFTIPCSocketAddress} instance.
@@ -462,7 +468,7 @@ public static AFTIPCSocketAddress unwrap(String hostname, int port) throws Socke
/**
* Returns an {@link AFTIPCSocketAddress} given a generic {@link SocketAddress}.
- *
+ *
* @param address The address to unwrap.
* @return The {@link AFTIPCSocketAddress} instance.
* @throws SocketException if the operation fails, for example when an unsupported address is
@@ -478,7 +484,7 @@ public static AFTIPCSocketAddress unwrap(SocketAddress address) throws SocketExc
/**
* Returns the scope of this address.
- *
+ *
* @return The scope.
*/
public Scope getScope() {
@@ -491,7 +497,7 @@ public Scope getScope() {
/**
* Returns the TIPC type part of this address.
- *
+ *
* @return The type identifier
*/
public int getTIPCType() {
@@ -502,7 +508,7 @@ public int getTIPCType() {
/**
* Returns the TIPC instance part of this address.
- *
+ *
* @return The instance identifier.
*/
public int getTIPCInstance() {
@@ -513,7 +519,7 @@ public int getTIPCInstance() {
/**
* Returns the TIPC domain part of this address.
- *
+ *
* @return The domain identifier.
*/
public int getTIPCDomain() {
@@ -524,7 +530,7 @@ public int getTIPCDomain() {
/**
* Returns the TIPC lower instance of this address.
- *
+ *
* @return The lower instance identifier.
*/
public int getTIPCLower() {
@@ -535,7 +541,7 @@ public int getTIPCLower() {
/**
* Returns the TIPC upper instance of this address.
- *
+ *
* @return The lower instance identifier.
*/
public int getTIPCUpper() {
@@ -546,7 +552,7 @@ public int getTIPCUpper() {
/**
* Returns the TIPC ref of this address.
- *
+ *
* @return The ref identifier.
*/
public int getTIPCRef() {
@@ -557,7 +563,7 @@ public int getTIPCRef() {
/**
* Returns the TIPC node hash of this address.
- *
+ *
* @return The node hash.
*/
public int getTIPCNodeHash() {
@@ -602,7 +608,7 @@ public File getFile() throws FileNotFoundException {
/**
* Checks if an {@link InetAddress} can be unwrapped to an {@link AFTIPCSocketAddress}.
- *
+ *
* @param addr The instance to check.
* @return {@code true} if so.
* @see #wrapAddress()
@@ -614,7 +620,7 @@ public static boolean isSupportedAddress(InetAddress addr) {
/**
* Checks if a {@link SocketAddress} can be unwrapped to an {@link AFTIPCSocketAddress}.
- *
+ *
* @param addr The instance to check.
* @return {@code true} if so.
* @see #unwrap(InetAddress, int)
@@ -636,7 +642,7 @@ private static byte[] toBytes(AddressType addrType, Scope scope, int a, int b, i
/**
* Returns the corresponding {@link AFAddressFamily}.
- *
+ *
* @return The address family instance.
*/
@SuppressWarnings("null")
@@ -645,6 +651,10 @@ public static synchronized AFAddressFamily addressFamily()
afTipc = AFAddressFamily.registerAddressFamily("tipc", //
AFTIPCSocketAddress.class, new AFSocketAddressConfig() {
+ private final AFSocketAddressConstructor addrConstr =
+ isUseDeserializationForInit() ? AFTIPCSocketAddress::newAFSocketAddress
+ : AFTIPCSocketAddress::new;
+
@Override
protected AFTIPCSocketAddress parseURI(URI u, int port) throws SocketException {
return AFTIPCSocketAddress.of(u, port);
@@ -652,7 +662,7 @@ protected AFTIPCSocketAddress parseURI(URI u, int port) throws SocketException {
@Override
protected AFSocketAddressConstructor addressConstructor() {
- return AFTIPCSocketAddress::new;
+ return addrConstr;
}
@Override
@@ -684,7 +694,7 @@ private String toTipcInt(int v) {
/**
* Returns an {@link AFTIPCSocketAddress} for the given URI, if possible.
- *
+ *
* @param uri The URI.
* @return The address.
* @throws SocketException if the operation fails.
@@ -696,7 +706,7 @@ public static AFTIPCSocketAddress of(URI uri) throws SocketException {
/**
* Returns an {@link AFTIPCSocketAddress} for the given URI, if possible.
- *
+ *
* @param uri The URI.
* @param overridePort The port to forcibly use, or {@code -1} for "don't override".
* @return The address.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java
index 4a4268d55..98e4eab92 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFTIPCSocketImplExtensions.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
/**
* TIPC-specific code that resides in the native library. To be used by {@code AFTIPCSocket} and
* {@code AFTIPCDatagramSocket} only.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFTIPCSocketImplExtensions implements
@@ -36,9 +36,9 @@ public final class AFTIPCSocketImplExtensions implements
/**
* Returns the TIPC "ErrInfo" data from the ancillary receive buffer.
- *
+ *
* Invalid for any other use.
- *
+ *
* @return The errinfo.
*/
public int[] getTIPCErrInfo() {
@@ -47,9 +47,9 @@ public int[] getTIPCErrInfo() {
/**
* Returns the TIPC "DestName" data from the ancillary receive buffer.
- *
+ *
* Invalid for any other use.
- *
+ *
* @return The DestName.
*/
public int[] getTIPCDestName() {
@@ -58,7 +58,7 @@ public int[] getTIPCDestName() {
/**
* Retrieves the 16-byte TIPC node identity given a node hash.
- *
+ *
* @param peer The node hash.
* @return The node identity, or {@code null} if unsupported.
* @throws IOException on error.
@@ -69,7 +69,7 @@ public byte[] getTIPCNodeId(int peer) throws IOException {
/**
* Retrieves the TIPC link name given a node hash and bearer Id.
- *
+ *
* @param peer The node hash.
* @param bearerId The bearer Id.
* @return The link name, or {@code null} if unsupported.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java
index 79e2369d4..e9bece9db 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramChannel.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
/**
* A {@link DatagramChannel} implementation that works with AF_UNIX Unix domain sockets.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFUNIXDatagramChannel extends AFDatagramChannel implements
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java
index ab3329d5e..3f332bc9e 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocket.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
/**
* A {@link DatagramSocket} implementation that works with AF_UNIX Unix domain sockets.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFUNIXDatagramSocket extends AFDatagramSocket implements
@@ -34,6 +34,11 @@ public final class AFUNIXDatagramSocket extends AFDatagramSocket {
+ return new AFUNIXDatagramSocket(fd, socketType);
+ });
+ }
+
static AFUNIXDatagramSocket newInstance(FileDescriptor fdObj, int localPort, int remotePort)
throws IOException {
return (AFUNIXDatagramSocket) newInstance(AFUNIXDatagramSocket::new, fdObj, localPort,
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java
index 4afca7d5c..669542c03 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXDatagramSocketImpl.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,11 @@
final class AFUNIXDatagramSocketImpl extends AFDatagramSocketImpl {
AFUNIXDatagramSocketImpl(FileDescriptor fd) throws IOException {
- super(AFUNIXSocketAddress.AF_UNIX, fd, AFSocketType.SOCK_DGRAM);
+ this(fd, AFSocketType.SOCK_DGRAM);
+ }
+
+ AFUNIXDatagramSocketImpl(FileDescriptor fd, AFSocketType socketType) throws IOException {
+ super(AFUNIXSocketAddress.AF_UNIX, fd, socketType);
}
AFUNIXSocketCredentials getPeerCredentials() throws IOException {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java
index 5e8411bb2..9b6074a82 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXProtocolFamily.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
/**
* Describes the protocol family supported by {@link AFUNIXSocketAddress} etc.
- *
+ *
* @author Christian Kohlschütter
*/
public enum AFUNIXProtocolFamily implements ProtocolFamily {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java
index 9dbf8344c..48c247153 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSelectorProvider.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ private AFUNIXSelectorProvider() {
/**
* Returns the singleton instance.
- *
+ *
* @return The instance.
*/
@SuppressFBWarnings("MS_EXPOSE_REP")
@@ -98,7 +98,7 @@ public static AFUNIXSelectorProvider getInstance() {
/**
* Returns the singleton instance.
- *
+ *
* @return The instance.
*/
public static AFUNIXSelectorProvider provider() {
@@ -107,7 +107,7 @@ public static AFUNIXSelectorProvider provider() {
@Override
protected
AFSocketPair
newSocketPair(P s1, P s2) {
- return new AFUNIXSocketPair
(s1, s2);
+ return new AFUNIXSocketPair<>(s1, s2);
}
@SuppressWarnings("unchecked")
@@ -122,6 +122,13 @@ public AFUNIXSocketPair openDatagramChannelPair() throws
return (AFUNIXSocketPair) super.openDatagramChannelPair();
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public AFUNIXSocketPair openDatagramChannelPair(AFSocketType type)
+ throws IOException {
+ return (AFUNIXSocketPair) super.openDatagramChannelPair(type);
+ }
+
@Override
protected AFUNIXSocket newSocket() throws IOException {
return AFUNIXSocket.newInstance();
@@ -132,6 +139,11 @@ public AFUNIXDatagramChannel openDatagramChannel() throws IOException {
return AFUNIXDatagramSocket.newInstance().getChannel();
}
+ @Override
+ public AFUNIXDatagramChannel openDatagramChannel(AFSocketType type) throws IOException {
+ return AFUNIXDatagramSocket.newInstance(type).getChannel();
+ }
+
@Override
public AFUNIXDatagramChannel openDatagramChannel(ProtocolFamily family) throws IOException {
return (AFUNIXDatagramChannel) super.openDatagramChannel(family);
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java
index d2d75fe1b..b30abaa81 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocket.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,13 +26,13 @@
/**
* The server part of an AF_UNIX domain socket.
- *
+ *
* @author Christian Kohlschütter
*/
public class AFUNIXServerSocket extends AFServerSocket {
/**
* Constructs a new, unconnected instance.
- *
+ *
* @throws IOException if the operation fails.
*/
protected AFUNIXServerSocket() throws IOException {
@@ -41,7 +41,7 @@ protected AFUNIXServerSocket() throws IOException {
/**
* Constructs a new instance, optionally associated with the given file descriptor.
- *
+ *
* @param fdObj The file descriptor, or {@code null}.
* @throws IOException if the operation fails.
*/
@@ -61,7 +61,7 @@ public AFUNIXServerSocketChannel getChannel() {
/**
* Returns a new, unbound AF_UNIX {@link ServerSocket}.
- *
+ *
* @return The new, unbound {@link AFServerSocket}.
* @throws IOException if the operation fails.
*/
@@ -78,7 +78,7 @@ static AFUNIXServerSocket newInstance(FileDescriptor fdObj, int localPort, int r
/**
* Returns a new AF_UNIX {@link ServerSocket} that is bound to the given
* {@link AFUNIXSocketAddress}.
- *
+ *
* @param addr The socket file to bind to.
* @return The new, bound {@link AFServerSocket}.
* @throws IOException if the operation fails.
@@ -89,7 +89,7 @@ public static AFUNIXServerSocket bindOn(final AFUNIXSocketAddress addr) throws I
/**
* Returns a new AF_UNIX {@link ServerSocket} that is bound to the given {@link AFSocketAddress}.
- *
+ *
* @param addr The socket file to bind to.
* @param deleteOnClose If {@code true}, the socket file (if the address points to a file) will be
* deleted upon {@link #close}.
@@ -103,7 +103,7 @@ public static AFUNIXServerSocket bindOn(final AFUNIXSocketAddress addr, boolean
/**
* Returns a new AF_UNIX {@link ServerSocket} that is bound to the given path.
- *
+ *
* @param path The path to bind to.
* @param deleteOnClose If {@code true}, the socket file will be deleted upon {@link #close}.
* @return The new, bound {@link AFServerSocket}.
@@ -116,7 +116,7 @@ public static AFUNIXServerSocket bindOn(final File path, boolean deleteOnClose)
/**
* Returns a new AF_UNIX {@link ServerSocket} that is bound to the given path.
- *
+ *
* @param path The path to bind to.
* @param deleteOnClose If {@code true}, the socket file will be deleted upon {@link #close}.
* @return The new, bound {@link AFServerSocket}.
@@ -131,7 +131,7 @@ public static AFUNIXServerSocket bindOn(final Path path, boolean deleteOnClose)
/**
* Returns a new, unbound AF_UNIX {@link ServerSocket} that will always bind to the given
* address, regardless of any socket address used in a call to bind.
- *
+ *
* @param forceAddr The address to use.
* @return The new, yet unbound {@link AFServerSocket}.
* @throws IOException if an exception occurs.
@@ -142,13 +142,13 @@ public static AFUNIXServerSocket forceBindOn(final AFUNIXSocketAddress forceAddr
}
@Override
- protected AFUNIXSocketImpl newImpl(FileDescriptor fdObj) throws SocketException {
+ protected AFSocketImpl newImpl(FileDescriptor fdObj) throws SocketException {
return new AFUNIXSocketImpl(fdObj);
}
/**
* Returns a new {@link AFSocket} instance.
- *
+ *
* @return The new instance.
* @throws IOException on error.
*/
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java
index be58f5b93..77d8a7ab1 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXServerSocketChannel.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
/**
* A selectable channel for stream-oriented listening sockets.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFUNIXServerSocketChannel extends AFServerSocketChannel {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java
index a4313402e..6c87662f8 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocket.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
/**
* Implementation of an AF_UNIX domain socket.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFUNIXSocket extends AFSocket implements
@@ -58,12 +58,12 @@ protected AFUNIXSocketChannel newChannel() {
/**
* Creates a new, unbound {@link AFSocket}.
- *
+ *
* This "default" implementation is a bit "lenient" with respect to the specification.
- *
+ *
* In particular, we ignore calls to {@link Socket#getTcpNoDelay()} and
* {@link Socket#setTcpNoDelay(boolean)}.
- *
+ *
* @return A new, unbound socket.
* @throws IOException if the operation fails.
*/
@@ -87,10 +87,10 @@ static AFUNIXSocket newInstance(AFUNIXSocketFactory factory) throws SocketExcept
/**
* Creates a new, unbound, "strict" {@link AFSocket}.
- *
+ *
* This call uses an implementation that tries to be closer to the specification than
* {@link #newInstance()}, at least for some cases.
- *
+ *
* @return A new, unbound socket.
* @throws IOException if the operation fails.
*/
@@ -100,7 +100,7 @@ public static AFUNIXSocket newStrictInstance() throws IOException {
/**
* Creates a new {@link AFSocket} and connects it to the given {@link AFUNIXSocketAddress}.
- *
+ *
* @param addr The address to connect to.
* @return A new, connected socket.
* @throws IOException if the operation fails.
@@ -147,14 +147,14 @@ public boolean hasOutboundFileDescriptors() {
/**
* Returns true iff {@link AFUNIXSocket}s are supported by the current Java VM.
- *
+ *
* To support {@link AFSocket}s, a custom JNI library must be loaded that is supplied with
* junixsocket, and the system must support AF_UNIX sockets.
- *
+ *
* This call is equivalent to checking {@link AFSocket#isSupported()} and
* {@link AFSocket#supports(AFSocketCapability)} with
* {@link AFSocketCapability#CAPABILITY_UNIX_DOMAIN}.
- *
+ *
* @return {@code true} iff supported.
*/
public static boolean isSupported() {
@@ -163,9 +163,9 @@ public static boolean isSupported() {
/**
* Very basic self-test function.
- *
+ *
* Prints "supported" and "capabilities" status to System.out.
- *
+ *
* @param args ignored.
*/
public static void main(String[] args) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java
index 4325b2a56..72b35db5c 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketAddress.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,20 +35,21 @@
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
+import java.util.function.Supplier;
import org.eclipse.jdt.annotation.NonNull;
/**
* Describes an {@link InetSocketAddress} that actually uses AF_UNIX sockets instead of AF_INET.
- *
+ *
* The ability to specify a port number is not specified by AF_UNIX sockets, but we need it
* sometimes, for example for RMI-over-AF_UNIX.
- *
+ *
* @author Christian Kohlschütter
*/
@SuppressWarnings("PMD.ShortMethodName")
public final class AFUNIXSocketAddress extends AFSocketAddress {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L; // do not change!
private static final Charset ADDRESS_CHARSET = Charset.defaultCharset();
@@ -57,6 +58,10 @@ public final class AFUNIXSocketAddress extends AFSocketAddress {
.registerAddressFamily("un", //
AFUNIXSocketAddress.class, new AFSocketAddressConfig() {
+ private final AFSocketAddressConstructor addrConstr =
+ isUseDeserializationForInit() ? AFUNIXSocketAddress::newAFSocketAddress
+ : AFUNIXSocketAddress::new;
+
@Override
public AFUNIXSocketAddress parseURI(URI u, int port) throws SocketException {
return AFUNIXSocketAddress.of(u, port);
@@ -64,7 +69,7 @@ public AFUNIXSocketAddress parseURI(URI u, int port) throws SocketException {
@Override
protected AFSocketAddressConstructor addressConstructor() {
- return AFUNIXSocketAddress::new;
+ return addrConstr;
}
@Override
@@ -86,12 +91,13 @@ private AFUNIXSocketAddress(int port, final byte[] socketAddress, ByteBuffer nat
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* file and port. Legacy constructor, do not use!
- *
+ *
* @param socketFile The socket to connect to.
* @throws SocketException if the operation fails.
* @deprecated Use {@link #of(File)} instead.
* @see #of(File)
*/
+ @Deprecated
public AFUNIXSocketAddress(File socketFile) throws SocketException {
this(socketFile, 0);
}
@@ -99,22 +105,29 @@ public AFUNIXSocketAddress(File socketFile) throws SocketException {
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* file. Legacy constructor, do not use!
- *
+ *
* @param socketFile The socket to connect to.
* @param port The port associated with this socket, or {@code 0} when no port should be assigned.
* @throws SocketException if the operation fails.
* @deprecated Use {@link #of(File, int)} instead.
* @see #of(File, int)
*/
+ @Deprecated
public AFUNIXSocketAddress(File socketFile, int port) throws SocketException {
this(port, of(socketFile, port).getPathAsBytes(), of(socketFile, port)
.getNativeAddressDirectBuffer());
}
+ private static AFUNIXSocketAddress newAFSocketAddress(int port, final byte[] socketAddress,
+ ByteBuffer nativeAddress) throws SocketException {
+ return newDeserializedAFSocketAddress(port, socketAddress, nativeAddress, AF_UNIX,
+ AFUNIXSocketAddress::new);
+ }
+
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* file.
- *
+ *
* @param socketFile The socket to connect to.
* @return A corresponding {@link AFUNIXSocketAddress} instance.
* @throws SocketException if the operation fails.
@@ -126,7 +139,7 @@ public static AFUNIXSocketAddress of(final File socketFile) throws SocketExcepti
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* file, assigning the given port to it.
- *
+ *
* @param socketFile The socket to connect to.
* @param port The port associated with this socket, or {@code 0} when no port should be assigned.
* @return A corresponding {@link AFUNIXSocketAddress} instance.
@@ -139,10 +152,10 @@ public static AFUNIXSocketAddress of(final File socketFile, int port) throws Soc
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* byte sequence.
- *
+ *
* NOTE: By specifying a byte array that starts with a zero byte, you indicate that the abstract
* namespace is to be used. This feature is not available on all target platforms.
- *
+ *
* @param socketAddress The socket address (as bytes).
* @return A corresponding {@link AFUNIXSocketAddress} instance.
* @throws SocketException if the operation fails.
@@ -155,7 +168,7 @@ public static AFUNIXSocketAddress of(final byte[] socketAddress) throws SocketEx
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* byte sequence, assigning the given port to it.
- *
+ *
* NOTE: By specifying a byte array that starts with a zero byte, you indicate that the abstract
* namespace is to be used. This feature is not available on all target platforms.
*
@@ -173,31 +186,35 @@ public static AFUNIXSocketAddress of(final byte[] socketAddress, int port)
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* path.
- *
+ *
* @param socketPath The socket to connect to.
* @return A corresponding {@link AFUNIXSocketAddress} instance.
* @throws SocketException if the operation fails.
*/
- public static AFUNIXSocketAddress of(final Path socketPath) throws SocketException {
+ public static AFUNIXSocketAddress of(Path socketPath) throws SocketException {
return of(socketPath, 0);
}
/**
* Returns an {@link AFUNIXSocketAddress} that points to the AF_UNIX socket specified by the given
* path, assigning the given port to it.
- *
+ *
* @param socketPath The socket to connect to.
* @param port The port associated with this socket, or {@code 0} when no port should be assigned.
* @return A corresponding {@link AFUNIXSocketAddress} instance.
* @throws SocketException if the operation fails.
*/
- public static AFUNIXSocketAddress of(final Path socketPath, int port) throws SocketException {
+ public static AFUNIXSocketAddress of(Path socketPath, int port) throws SocketException {
+ if (!PathUtil.isPathInDefaultFileSystem(socketPath)) {
+ throw new SocketException("Path is not in the default file system");
+ }
+
return of(socketPath.toString().getBytes(ADDRESS_CHARSET), port);
}
/**
* Returns an {@link AFUNIXSocketAddress} for the given URI, if possible.
- *
+ *
* @param u The URI.
* @return The address.
* @throws SocketException if the operation fails.
@@ -208,7 +225,7 @@ public static AFUNIXSocketAddress of(URI u) throws SocketException {
/**
* Returns an {@link AFUNIXSocketAddress} for the given URI, if possible.
- *
+ *
* @param u The URI.
* @param overridePort The port to forcibly use, or {@code -1} for "don't override".
* @return The address.
@@ -240,7 +257,7 @@ public static AFUNIXSocketAddress of(URI u, int overridePort) throws SocketExcep
/**
* Returns an {@link AFUNIXSocketAddress} that points to a temporary, non-existent but accessible
* path in the file system.
- *
+ *
* @return A corresponding {@link AFUNIXSocketAddress} instance.
* @throws IOException if the operation fails.
*/
@@ -251,7 +268,7 @@ public static AFUNIXSocketAddress ofNewTempFile() throws IOException {
/**
* Returns an {@link AFUNIXSocketAddress} that points to a temporary, non-existent but accessible
* path in the file system, assigning the given port to it.
- *
+ *
* @param port The port associated with this socket, or {@code 0} when no port should be assigned.
* @return A corresponding {@link AFUNIXSocketAddress} instance.
* @throws IOException if the operation fails.
@@ -260,6 +277,24 @@ public static AFUNIXSocketAddress ofNewTempPath(int port) throws IOException {
return of(newTempPath(true), port);
}
+ /**
+ * Returns an {@link AFUNIXSocketAddress} based on the given {@link SocketAddress}.
+ *
+ * This either simply casts an existing {@link AFUNIXSocketAddress}, or converts a
+ * {@code UnixDomainSocketAddress} to it.
+ *
+ * @param address The address to convert.
+ * @return A corresponding {@link AFUNIXSocketAddress} instance.
+ * @throws SocketException if the operation fails.
+ */
+ public static AFUNIXSocketAddress of(SocketAddress address) throws IOException {
+ AFUNIXSocketAddress addr = unwrap(Objects.requireNonNull(address));
+ if (addr == null) {
+ throw new SocketException("Could not convert SocketAddress to AFUNIXSocketAddress");
+ }
+ return addr;
+ }
+
static File newTempPath(boolean deleteOnExit) throws IOException {
File f = File.createTempFile("jux", ".sock");
if (deleteOnExit) {
@@ -274,7 +309,7 @@ static File newTempPath(boolean deleteOnExit) throws IOException {
/**
* Returns an {@link AFUNIXSocketAddress} given a special {@link InetAddress} that encodes the
* byte sequence of an AF_UNIX socket address, like those returned by {@link #wrapAddress()}.
- *
+ *
* @param address The "special" {@link InetAddress}.
* @param port The port (use 0 for "none").
* @return The {@link AFUNIXSocketAddress} instance.
@@ -287,7 +322,7 @@ public static AFUNIXSocketAddress unwrap(InetAddress address, int port) throws S
/**
* Returns an {@link AFUNIXSocketAddress} given a generic {@link SocketAddress}.
- *
+ *
* @param address The address to unwrap.
* @return The {@link AFUNIXSocketAddress} instance.
* @throws SocketException if the operation fails, for example when an unsupported address is
@@ -296,17 +331,18 @@ public static AFUNIXSocketAddress unwrap(InetAddress address, int port) throws S
public static AFUNIXSocketAddress unwrap(SocketAddress address) throws SocketException {
// FIXME: add support for UnixDomainSocketAddress
Objects.requireNonNull(address);
- if (!isSupportedAddress(address)) {
+ Supplier supplier = supportedAddressSupplier(address);
+ if (supplier == null) {
throw new SocketException("Unsupported address");
}
- return (AFUNIXSocketAddress) address;
+ return supplier.get();
}
/**
* Returns an {@link AFUNIXSocketAddress} given a special {@link InetAddress} hostname that
* encodes the byte sequence of an AF_UNIX socket address, like those returned by
* {@link #wrapAddress()}.
- *
+ *
* @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}.
* @param port The port (use 0 for "none").
* @return The {@link AFUNIXSocketAddress} instance.
@@ -319,11 +355,11 @@ public static AFUNIXSocketAddress unwrap(String hostname, int port) throws Socke
/**
* Convenience method to create an {@link AFUNIXSocketAddress} in the abstract namespace.
- *
+ *
* The returned socket address will use the byte representation of this identifier (using the
* system's default character encoding), prefixed with a null byte (to indicate the abstract
* namespace is used).
- *
+ *
* @param name The identifier in the abstract namespace, without trailing zero or @.
* @return The address.
* @throws SocketException if the operation fails.
@@ -334,11 +370,11 @@ public static AFUNIXSocketAddress inAbstractNamespace(String name) throws Socket
/**
* Convenience method to create an {@link AFUNIXSocketAddress} in the abstract namespace.
- *
+ *
* The returned socket address will use the byte representation of this identifier (using the
* system's default character encoding), prefixed with a null byte (to indicate the abstract
* namespace is used).
- *
+ *
* @param name The identifier in the abstract namespace, without trailing zero or @.
* @param port The port associated with this socket, or {@code 0} when no port should be assigned.
* @return The address.
@@ -380,10 +416,10 @@ public String toString() {
/**
* Returns the path to the UNIX domain socket, as a human-readable string using the default
* encoding.
- *
+ *
* For addresses in the abstract namespace, the US_ASCII encoding is used; zero-bytes are
* converted to '@', other non-printable bytes are converted to '.'
- *
+ *
* @return The path.
* @see #getPathAsBytes()
*/
@@ -411,10 +447,10 @@ public String getPath() {
/**
* Returns the {@link Charset} used to encode/decode {@link AFUNIXSocketAddress}es.
- *
+ *
* This is usually the system default charset, unless that is {@link StandardCharsets#US_ASCII}
* (7-bit), in which case {@link StandardCharsets#ISO_8859_1} is used instead.
- *
+ *
* @return The charset.
*/
public static Charset addressCharset() {
@@ -423,7 +459,7 @@ public static Charset addressCharset() {
/**
* Returns the path to the UNIX domain socket, as bytes.
- *
+ *
* @return The path.
* @see #getPath()
*/
@@ -432,8 +468,9 @@ public byte[] getPathAsBytes() {
}
/**
- * Checks if the address is in the abstract namespace.
- *
+ * Checks if the address is in the abstract namespace (or, for Haiku OS, in the internal
+ * namespace).
+ *
* @return {@code true} if the address is in the abstract namespace.
*/
public boolean isInAbstractNamespace() {
@@ -462,7 +499,7 @@ public File getFile() throws FileNotFoundException {
/**
* Checks if an {@link InetAddress} can be unwrapped to an {@link AFUNIXSocketAddress}.
- *
+ *
* @param addr The instance to check.
* @return {@code true} if so.
* @see #wrapAddress()
@@ -474,18 +511,35 @@ public static boolean isSupportedAddress(InetAddress addr) {
/**
* Checks if a {@link SocketAddress} can be unwrapped to an {@link AFUNIXSocketAddress}.
- *
+ *
* @param addr The instance to check.
* @return {@code true} if so.
* @see #unwrap(InetAddress, int)
*/
public static boolean isSupportedAddress(SocketAddress addr) {
- return (addr instanceof AFUNIXSocketAddress);
+ return supportedAddressSupplier(addr) != null;
+ }
+
+ /**
+ * Checks if the given address can be unwrapped to an {@link AFUNIXSocketAddress}, and if so,
+ * returns a supplier function; if not, {@code null} is returned.
+ *
+ * @param addr The address.
+ * @return The supplier, or {@code null}.
+ */
+ static Supplier supportedAddressSupplier(SocketAddress addr) {
+ if (addr == null) {
+ return null;
+ } else if (addr instanceof AFUNIXSocketAddress) {
+ return () -> ((AFUNIXSocketAddress) addr);
+ } else {
+ return SocketAddressUtil.supplyAFUNIXSocketAddress(addr);
+ }
}
/**
* Returns the corresponding {@link AFAddressFamily}.
- *
+ *
* @return The address family instance.
*/
@SuppressWarnings("null")
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java
index 8e56621a8..4cbf992e6 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCapability.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,12 +20,12 @@
/**
* Describes junixsocket capabilities the current environment (system platform, native library,
* etc.) may or may not support.
- *
+ *
* You can check whether your environment supports a given capability by calling
* {@link AFUNIXSocket#supports(AFUNIXSocketCapability)}.
- *
+ *
* This enum is deprecated. Use {@link AFSocketCapability} instead.
- *
+ *
* @see AFSocketCapability
*/
@Deprecated
@@ -49,7 +49,7 @@ public enum AFUNIXSocketCapability {
/**
* A pair of interconnected sockets can be created natively.
- *
+ *
* This currently not possible on Windows, but instead emulated via anonymous AF_INET ports when
* you use {@link AFUNIXSocketPair}.
*/
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java
index a5f27583f..8a14096c5 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketChannel.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
/**
* A selectable channel for stream-oriented connecting sockets.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFUNIXSocketChannel extends AFSocketChannel implements
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java
index 28b7f7c93..575b57f69 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketCredentials.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ public final class AFUNIXSocketCredentials implements Serializable {
/**
* Returns the "pid" (process ID), or {@code -1} if it could not be retrieved.
- *
+ *
* @return The pid, or -1.
*/
public long getPid() {
@@ -72,7 +72,7 @@ public long getPid() {
/**
* Returns the "uid" (user ID), or {@code -1} if it could not be retrieved.
- *
+ *
* @return The uid, or -1.
*/
public long getUid() {
@@ -81,7 +81,7 @@ public long getUid() {
/**
* Returns the primary "gid" (group ID), or {@code -1} if it could not be retrieved.
- *
+ *
* @return The gid, or -1.
*/
public long getGid() {
@@ -90,10 +90,10 @@ public long getGid() {
/**
* Returns all "gid" values (group IDs), or {@code null} if they could not be retrieved.
- *
+ *
* Note that this list may be incomplete (only the primary gid may be returned), but it is
* guaranteed that the first one in the list is the primary gid as returned by {@link #getGid()}.
- *
+ *
* @return The gids, or null.
*/
public long[] getGids() {
@@ -103,7 +103,7 @@ public long[] getGids() {
/**
* Returns the process' unique identifier, or {@code null} if no such identifier could be
* retrieved. Note that all processes run by the same Java runtime may share the same UUID.
- *
+ *
* @return The UUID, or null.
*/
public UUID getUUID() {
@@ -120,7 +120,7 @@ void setGids(long[] gids) {
/**
* Checks if neither of the possible peer credentials are set.
- *
+ *
* @return {@code true} if no credentials set.
*/
public boolean isEmpty() {
@@ -201,10 +201,10 @@ public boolean equals(Object obj) {
/**
* Returns the {@link AFUNIXSocketCredentials} for the currently active remote session, or
* {@code null} if it was not possible to retrieve these credentials.
- *
+ *
* NOTE: For now, only RMI remote sessions are supported (RemoteServer sessions during a remote
* method invocation).
- *
+ *
* If you want to retrieve the peer credentials for an RMI server, see junixsocket-rmi's
* RemotePeerInfo.
*
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java
index a59ea780d..0045f7297 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketExtensions.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,23 +24,23 @@
/**
* Defines certain methods that all junixsocket AF_UNIX socket implementations share and extend
* beyond the standard socket API.
- *
+ *
* The set of features include methods to support working with ancillary messages (such as file
* descriptors) as well as socket credentials.
- *
+ *
* Keep in mind that the platform this code runs on may not support these features, and exceptions
* may be thrown when not checking for the corresponding {@link AFUNIXSocketCapability} first.
- *
+ *
* @author Christian Kohlschütter
*/
public interface AFUNIXSocketExtensions extends AFSocketExtensions {
/**
* Retrieves an array of incoming {@link FileDescriptor}s that were sent as ancillary messages,
* along with a call to {@link InputStream#read()}, etc.
- *
+ *
* NOTE: Another call to this method will not return the same file descriptors again (most likely,
* an empty array will be returned).
- *
+ *
* @return The file descriptors, or an empty array if none were available.
* @throws IOException if the operation fails.
*/
@@ -54,15 +54,15 @@ public interface AFUNIXSocketExtensions extends AFSocketExtensions {
/**
* Sets a list of {@link FileDescriptor}s that should be sent as an ancillary message along with
* the next write.
- *
+ *
* Important: There can only be one set of file descriptors active until the write completes. The
* socket also needs to be connected for this operation to succeed.
- *
+ *
* It is also important to know that there may be an upper limit imposed by the operation system
* as to how many file descriptors can be sent at once. Linux, for example, may support up to 253.
* If the number of file descriptors exceeds the limit, an exception may be thrown when sending
* data along with the ancillary message containing the file descriptors.
- *
+ *
* @param fdescs The file descriptors, or {@code null} if none.
* @throws IOException if the operation fails.
*/
@@ -71,7 +71,7 @@ public interface AFUNIXSocketExtensions extends AFSocketExtensions {
/**
* Returns {@code true} if there are pending file descriptors to be sent as part of an ancillary
* message.
- *
+ *
* @return {@code true} if there are file descriptors pending.
*/
boolean hasOutboundFileDescriptors();
@@ -80,7 +80,7 @@ public interface AFUNIXSocketExtensions extends AFSocketExtensions {
* Retrieves the "peer credentials" for this connection.
*
* These credentials may be useful to authenticate the other end of the socket (client or server).
- *
+ *
* Depending on the socket/connection/environment, you may not receive any or all credentials. For
* example, on Linux, {@link AFUNIXDatagramSocket} and {@link AFUNIXDatagramChannel} may not be
* able to retrieve credentials at all.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java
index 3ac279104..46b3e18bd 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketFactory.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,10 +28,10 @@
/**
* The base for a SocketFactory that connects to UNIX sockets.
- *
+ *
* Typically, the "hostname" is used as a reference to a socketFile on the file system. The actual
* mapping is left to the implementor.
- *
+ *
* @see AFUNIXSocketFactory.FactoryArg
* @see AFUNIXSocketFactory.SystemProperty
* @see AFUNIXSocketFactory.URIScheme
@@ -83,9 +83,9 @@ private static String getDefaultSocketHostname() {
* A socket factory that handles a custom hostname ("localhost", by default, and configured by the
* system property "org.newsclub.net.unix.socket.hostname"), forwarding all other
* requests to the fallback {@link SocketFactory}.
- *
+ *
* The socket path is configured through an argument passed by to the constructor.
- *
+ *
* This is particularly useful for JDBC drivers that take a "socketFactory" and a
* "socketFactoryArg". The latter will be passed as a constructor argument.
*/
@@ -94,7 +94,7 @@ public static final class FactoryArg extends DefaultSocketHostnameSocketFactory
/**
* Constructs a new {@link FactoryArg} factory using the given socket path.
- *
+ *
* @param socketPath The path to the socket.
*/
public FactoryArg(String socketPath) {
@@ -106,7 +106,7 @@ public FactoryArg(String socketPath) {
/**
* Constructs a new {@link FactoryArg} factory using the given socket path.
- *
+ *
* @param file The path to the socket.
*/
public FactoryArg(File file) {
@@ -126,10 +126,10 @@ public AFUNIXSocketAddress addressFromHost(String host, int port) throws SocketE
* A socket factory that handles a custom hostname ("junixsocket.localhost", by default, and
* configured by the system property "org.newsclub.net.unix.socket.hostname"),
* forwarding all other requests to the fallback {@link SocketFactory}.
- *
+ *
* The socket path is configured through a system property,
* "org.newsclub.net.unix.socket.default".
- *
+ *
* NOTE: While it is technically possible, it is highly discouraged to programmatically change the
* value of the property as it can lead to concurrency issues and undefined behavior.
*/
@@ -157,12 +157,12 @@ public AFUNIXSocketAddress addressFromHost(String host, int port) throws SocketE
/**
* A socket factory that handles special host names formatted as file:// URIs.
- *
+ *
* The file:// URI may also be specified in URL-encoded format, i.e., file:%3A%2F%2F etc.
- *
+ *
* You may also surround the URL with square brackets ("[" and "]"), whereas the closing bracket
* may be omitted.
- *
+ *
* NOTE: In some circumstances it is recommended to use "[file:%3A%2F%2F(...)", i.e.
* encoded and without the closing bracket. Since this is an invalid hostname, it will not trigger
* a DNS lookup, but can still be used within a JDBC Connection URL.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java
index 35934871b..b18342770 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketImpl.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,18 +23,18 @@
import java.net.SocketException;
class AFUNIXSocketImpl extends AFSocketImpl {
- protected AFUNIXSocketImpl(FileDescriptor fdObj) throws SocketException {
+ protected AFUNIXSocketImpl(FileDescriptor fdObj) {
super(AFUNIXSocketAddress.AF_UNIX, fdObj);
}
/**
* Changes the behavior to be somewhat lenient with respect to the specification.
- *
+ *
* In particular, we ignore calls to {@link Socket#getTcpNoDelay()} and
* {@link Socket#setTcpNoDelay(boolean)}.
*/
static final class Lenient extends AFUNIXSocketImpl {
- protected Lenient(FileDescriptor fdObj) throws SocketException {
+ Lenient(FileDescriptor fdObj) throws SocketException {
super(fdObj);
}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java
index 08e22cbee..6d43c03c9 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFUNIXSocketPair.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,10 +18,11 @@
package org.newsclub.net.unix;
import java.io.IOException;
+import java.nio.channels.DatagramChannel;
/**
* A pair of sockets.
- *
+ *
* @param The socket type.
* @author Christian Kohlschütter
*/
@@ -32,7 +33,7 @@ public final class AFUNIXSocketPair extends AFSocketPair
/**
* Opens a socket pair of interconnected channels.
- *
+ *
* @return The new channel pair.
* @throws IOException on error.
*/
@@ -42,11 +43,23 @@ public static AFUNIXSocketPair open() throws IOException {
/**
* Opens a socket pair of interconnected datagram channels.
- *
+ *
* @return The new channel pair.
* @throws IOException on error.
*/
public static AFUNIXSocketPair openDatagram() throws IOException {
return AFUNIXSelectorProvider.provider().openDatagramChannelPair();
}
+
+ /**
+ * Opens a socket pair of interconnected {@link DatagramChannel}s, using the given socket type.
+ *
+ * @param type The socket type.
+ * @return The new channel pair.
+ * @throws IOException on error.
+ */
+ public static AFUNIXSocketPair openDatagram(AFSocketType type)
+ throws IOException {
+ return AFUNIXSelectorProvider.provider().openDatagramChannelPair(type);
+ }
}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java
index a9c8012e0..d9cc795e8 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketAddress.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,11 +35,11 @@
/**
* An {@link AFSocketAddress} for VSOCK sockets.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFVSOCKSocketAddress extends AFSocketAddress {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L; // do not change!
private static final Pattern PAT_VSOCK_URI_HOST_AND_PORT = Pattern.compile(
"^(?any|[0-9a-fx\\-]+)(\\.(?any|hypervisor|local|host|[0-9a-fx\\-]+))?(?:\\:(?[0-9]+))?$");
@@ -76,6 +76,12 @@ private AFVSOCKSocketAddress(int port, final byte[] socketAddress, ByteBuffer na
super(port, socketAddress, nativeAddress, addressFamily());
}
+ private static AFVSOCKSocketAddress newAFSocketAddress(int port, final byte[] socketAddress,
+ ByteBuffer nativeAddress) throws SocketException {
+ return newDeserializedAFSocketAddress(port, socketAddress, nativeAddress, addressFamily(),
+ AFVSOCKSocketAddress::new);
+ }
+
/**
* Returns an {@link AFVSOCKSocketAddress} that refers to a given VSOCK port and CID; the "java
* port" is set to -1.
@@ -104,7 +110,7 @@ public static AFVSOCKSocketAddress ofHypervisorPort(int port) throws SocketExcep
/**
* Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any"
* port on the hypervisor; the "java port" is set to -1.
- *
+ *
* @return A corresponding {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails.
*/
@@ -115,7 +121,7 @@ public static AFVSOCKSocketAddress ofAnyHypervisorPort() throws SocketException
/**
* Returns an {@link AFVSOCKSocketAddress} that refers to the given port with the local/loopback
* CID; the "java port" is set to -1.
- *
+ *
* @param port The VSOCK port.
* @return A corresponding {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails.
@@ -127,7 +133,7 @@ public static AFVSOCKSocketAddress ofLocalPort(int port) throws SocketException
/**
* Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any"
* port with the local/loopback CID; the "java port" is set to -1.
- *
+ *
* @return A corresponding {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails.
*/
@@ -150,7 +156,7 @@ public static AFVSOCKSocketAddress ofHostPort(int port) throws SocketException {
/**
* Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any"
* port on the host; the "java port" is set to -1.
- *
+ *
* @return A corresponding {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails.
*/
@@ -161,7 +167,7 @@ public static AFVSOCKSocketAddress ofAnyHostPort() throws SocketException {
/**
* Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to "any"
* port and CID; the "java port" is set to -1.
- *
+ *
* @return A corresponding {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails.
*/
@@ -172,7 +178,7 @@ public static AFVSOCKSocketAddress ofAnyPort() throws SocketException {
/**
* Returns an {@link AFVSOCKSocketAddress}, especially useful for binding, that refers to the
* given port with "any CID"; the "java port" is set to -1.
- *
+ *
* @param port The VSOCK port.
* @return A corresponding {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails.
@@ -198,7 +204,7 @@ public static AFVSOCKSocketAddress ofPortAndCID(int javaPort, int vsockPort, int
/**
* Returns an {@link AFVSOCKSocketAddress} given a special {@link InetAddress} that encodes the
* byte sequence of an AF_VSOCK socket address, like those returned by {@link #wrapAddress()}.
- *
+ *
* @param address The "special" {@link InetAddress}.
* @param port The port (use 0 for "none").
* @return The {@link AFVSOCKSocketAddress} instance.
@@ -213,7 +219,7 @@ public static AFVSOCKSocketAddress unwrap(InetAddress address, int port) throws
* Returns an {@link AFVSOCKSocketAddress} given a special {@link InetAddress} hostname that
* encodes the byte sequence of an AF_VSOCK socket address, like those returned by
* {@link #wrapAddress()}.
- *
+ *
* @param hostname The "special" hostname, as provided by {@link InetAddress#getHostName()}.
* @param port The port (use 0 for "none").
* @return The {@link AFVSOCKSocketAddress} instance.
@@ -226,7 +232,7 @@ public static AFVSOCKSocketAddress unwrap(String hostname, int port) throws Sock
/**
* Returns an {@link AFVSOCKSocketAddress} given a generic {@link SocketAddress}.
- *
+ *
* @param address The address to unwrap.
* @return The {@link AFVSOCKSocketAddress} instance.
* @throws SocketException if the operation fails, for example when an unsupported address is
@@ -242,7 +248,7 @@ public static AFVSOCKSocketAddress unwrap(SocketAddress address) throws SocketEx
/**
* Returns the "VSOCK port" part of this address.
- *
+ *
* @return The VSOCK port identifier
* @see #getPort()
*/
@@ -254,7 +260,7 @@ public int getVSOCKPort() {
/**
* Returns the "VSOCK CID" part of this address.
- *
+ *
* @return The VSOCK CID identifier.
*/
public int getVSOCKCID() {
@@ -265,7 +271,7 @@ public int getVSOCKCID() {
/**
* Returns the "VSOCK reserved1" part of this address.
- *
+ *
* @return The "reserved1" identifier, which should be 0.
*/
public int getVSOCKReserved1() {
@@ -313,7 +319,7 @@ public File getFile() throws FileNotFoundException {
/**
* Checks if an {@link InetAddress} can be unwrapped to an {@link AFVSOCKSocketAddress}.
- *
+ *
* @param addr The instance to check.
* @return {@code true} if so.
* @see #wrapAddress()
@@ -325,7 +331,7 @@ public static boolean isSupportedAddress(InetAddress addr) {
/**
* Checks if a {@link SocketAddress} can be unwrapped to an {@link AFVSOCKSocketAddress}.
- *
+ *
* @param addr The instance to check.
* @return {@code true} if so.
* @see #unwrap(InetAddress, int)
@@ -345,7 +351,7 @@ private static byte[] toBytes(int port, int cid) {
/**
* Returns the corresponding {@link AFAddressFamily}.
- *
+ *
* @return The address family instance.
*/
@SuppressWarnings("null")
@@ -354,6 +360,10 @@ public static synchronized AFAddressFamily addressFamily()
afVsock = AFAddressFamily.registerAddressFamily("vsock", //
AFVSOCKSocketAddress.class, new AFSocketAddressConfig() {
+ private final AFSocketAddressConstructor addrConstr =
+ isUseDeserializationForInit() ? AFVSOCKSocketAddress::newAFSocketAddress
+ : AFVSOCKSocketAddress::new;
+
@Override
protected AFVSOCKSocketAddress parseURI(URI u, int port) throws SocketException {
return AFVSOCKSocketAddress.of(u, port);
@@ -361,7 +371,7 @@ protected AFVSOCKSocketAddress parseURI(URI u, int port) throws SocketException
@Override
protected AFSocketAddressConstructor addressConstructor() {
- return AFVSOCKSocketAddress::new;
+ return addrConstr;
}
@Override
@@ -385,7 +395,7 @@ protected Set uriSchemes() {
/**
* Returns an {@link AFVSOCKSocketAddress} for the given URI, if possible.
- *
+ *
* @param uri The URI.
* @return The address.
* @throws SocketException if the operation fails.
@@ -397,7 +407,7 @@ public static AFVSOCKSocketAddress of(URI uri) throws SocketException {
/**
* Returns an {@link AFVSOCKSocketAddress} for the given URI, if possible.
- *
+ *
* @param uri The URI.
* @param overridePort The port to forcibly use, or {@code -1} for "don't override".
* @return The address.
@@ -551,13 +561,13 @@ private static int parseInt(String v) {
/**
* Checks if the given address could cover another address.
- *
+ *
* By default, this is only true if both addresses are regarded equal using
* {@link #equals(Object)}.
- *
+ *
* However, implementations may support "wildcard" addresses, and this method would compare a
* wildcard address against some non-wildcard address, for example.
- *
+ *
* @param covered The other address that could be covered by this address.
* @return {@code true} if the other address could be covered.
*/
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java
index fc7b65e66..2e985958e 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AFVSOCKSocketImplExtensions.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
/**
* VSOCK-specific code that resides in the native library. To be used by {@code AFVSOCKSocket} and
* {@code AFVSOCKDatagramSocket} only.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFVSOCKSocketImplExtensions implements
@@ -36,12 +36,12 @@ public final class AFVSOCKSocketImplExtensions implements
/**
* Returns the local CID.
- *
+ *
* If the system does not support vsock, or status about support cannot be retrieved, -1
* ({@link AFVSOCKSocketAddress#VMADDR_CID_ANY}) is returned.
- *
+ *
* The value may be cached upon initialization of the library.
- *
+ *
* @return The CID, or -1.
* @throws IOException on error.
*/
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java
index c892bcd13..06db22615 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AddressUnavailableSocketException.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
/**
* A {@link SocketException} that may be thrown upon some "address unavailable" condition from
* native code (e.g., EADDRNOTAVAIL is returned).
- *
+ *
* @author Christian Kohlschütter
*/
public class AddressUnavailableSocketException extends InvalidSocketException {
@@ -37,7 +37,7 @@ public AddressUnavailableSocketException() {
/**
* Constructs a new {@link AddressUnavailableSocketException}.
- *
+ *
* @param msg The error message.
*/
public AddressUnavailableSocketException(String msg) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java
index e6c63764d..0bb95ddaf 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/AncillaryDataSupport.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,11 +20,11 @@
import java.io.Closeable;
import java.io.FileDescriptor;
import java.io.IOException;
+import java.net.SocketException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -38,10 +38,10 @@ final class AncillaryDataSupport implements Closeable {
.ancillaryBufMinLen() : 0;
private final Map openReceivedFileDescriptors = Collections
- .synchronizedMap(new HashMap());
+ .synchronizedMap(new HashMap<>());
private final List receivedFileDescriptors = Collections.synchronizedList(
- new LinkedList());
+ new ArrayList<>());
// referenced from native code
private ByteBuffer ancillaryReceiveBuffer = EMPTY_BUFFER;
@@ -131,7 +131,12 @@ public void close() throws IOException {
openReceivedFileDescriptors.remove(fdesc);
}
};
- NativeUnixSocket.attachCloseable(fdesc, cleanup);
+
+ try {
+ NativeUnixSocket.attachCloseable(fdesc, cleanup);
+ } catch (SocketException e) {
+ // ignore (cannot attach)
+ }
}
this.receivedFileDescriptors.add(descriptors);
@@ -193,10 +198,12 @@ void setOutboundFileDescriptors(FileDescriptor... fdescs) throws IOException {
public void close() {
synchronized (openReceivedFileDescriptors) {
for (FileDescriptor desc : openReceivedFileDescriptors.keySet()) {
- try {
- NativeUnixSocket.close(desc);
- } catch (Exception e) {
- // ignore
+ if (desc.valid()) {
+ try {
+ NativeUnixSocket.close(desc);
+ } catch (Exception e) {
+ // ignore
+ }
}
}
}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java
index 55973cb62..1d9e423a1 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/BrokenPipeSocketException.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
/**
* A {@link SocketException} indicating that a socket connection was broken ("broken pipe").
- *
+ *
* @author Christian Kohlschütter
*/
public final class BrokenPipeSocketException extends SocketException {
@@ -36,7 +36,7 @@ public BrokenPipeSocketException() {
/**
* Constructs a new {@link BrokenPipeSocketException}.
- *
+ *
* @param msg The error message.
*/
public BrokenPipeSocketException(String msg) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java
index e77bfe952..b3db5d71f 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/CleanableState.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
/**
* This wrapper (along with the Java 8-specific counterpart in src/main/java8) allows us to
* implement cleanup logic for objects that are garbage-collectable/no longer reachable.
- *
+ *
*
* Usage:
*
@@ -46,7 +46,7 @@
*
In Java 8 or earlier, {@link #finalize()} calls {@link #doClean()} directly.
*
*
- *
+ *
* @author Christian Kohlschütter
*/
abstract class CleanableState implements Closeable {
@@ -56,7 +56,7 @@ abstract class CleanableState implements Closeable {
/**
* Creates a state object to be used as an implementation detail of the specified observed
* instance.
- *
+ *
* @param observed The observed instance (the outer class referencing this
* {@link CleanableState}).
*/
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java
index 557c1eb97..ab86a5dbb 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/CloseablePair.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
/**
* A pair of two closeable items.
- *
+ *
* @param The type of the items.
* @author Christian Kohlschütter
*/
@@ -36,7 +36,7 @@ public class CloseablePair implements Closeable {
/**
* Creates a pair of two items.
- *
+ *
* @param a The first item.
* @param b The second item.
*/
@@ -46,7 +46,7 @@ public CloseablePair(T a, T b) {
/**
* Creates a pair of two items.
- *
+ *
* @param a The first item.
* @param b The second item.
* @param alsoClose Some closeable that is also closed upon {@link #close()}, or {@code null}.
@@ -70,7 +70,7 @@ public final void close() throws IOException {
/**
* Returns the pair's first item.
- *
+ *
* @return The first item.
*/
public final @NonNull T getFirst() {
@@ -79,7 +79,7 @@ public final void close() throws IOException {
/**
* Returns the pair's second item.
- *
+ *
* @return The second item.
*/
public final @NonNull T getSecond() {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java
index c2c3be5a9..57ec5792d 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/Closeables.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,10 +26,11 @@
/**
* A set of {@link Closeables} that can be closed at once.
- *
+ *
* @author Christian Kohlschütter
*/
public final class Closeables implements Closeable {
+ private boolean closed = false;
private List> list;
/**
@@ -41,12 +42,13 @@ public Closeables() {
/**
* Creates a new {@link Closeables} instance, populating it with the given {@link Closeable}
* objects.
- *
+ *
* @param closeable The {@link Closeable}s to add.
*/
public Closeables(Closeable... closeable) {
+ this.list = new ArrayList<>();
for (Closeable cl : closeable) {
- this.list.add(new HardReference(cl));
+ this.list.add(new HardReference<>(cl));
}
}
@@ -55,9 +57,18 @@ public void close() throws IOException {
close(null);
}
+ /**
+ * Checks if this instance has been closed already.
+ *
+ * @return {@code true} if closed.
+ */
+ public synchronized boolean isClosed() {
+ return closed;
+ }
+
/**
* Closes all registered closeables.
- *
+ *
* @param superException If set, any exceptions thrown in here will be chained to the given
* exception via addSuppressed, and then thrown.
* @throws IOException if an exception occurs.
@@ -65,21 +76,32 @@ public void close() throws IOException {
public void close(IOException superException) throws IOException {
IOException exc = superException;
- if (list != null) {
- for (WeakReference ref : list) {
- @SuppressWarnings("resource")
- Closeable cl = ref.get();
- if (cl == null) {
- continue;
- }
- try {
- cl.close();
- } catch (IOException e) {
- if (exc == null) {
- exc = e;
- } else {
- exc.addSuppressed(e);
- }
+ List> l;
+ synchronized (this) {
+ closed = true;
+
+ l = this.list;
+ if (l == null) {
+ return;
+ }
+
+ l = new ArrayList<>(l);
+ this.list = null;
+ }
+
+ for (WeakReference ref : l) {
+ @SuppressWarnings("resource")
+ Closeable cl = ref.get();
+ if (cl == null) {
+ continue;
+ }
+ try {
+ cl.close();
+ } catch (IOException e) {
+ if (exc == null) {
+ exc = e;
+ } else {
+ exc.addSuppressed(e);
}
}
}
@@ -106,12 +128,15 @@ public V get() {
/**
* Adds the given closeable, but only using a weak reference.
- *
+ *
* @param closeable The closeable.
- * @return {@code true} iff the closeable was added, {@code false} if it was {@code null} or
- * already added before.
+ * @return {@code true} iff the closeable was added, {@code false} if it was {@code null}, already
+ * added before, or if the {@link Closeables} instance has been closed already.
*/
public synchronized boolean add(WeakReference closeable) {
+ if (closed) {
+ return false;
+ }
Closeable cl = closeable.get();
if (cl == null) {
// ignore
@@ -133,7 +158,7 @@ public synchronized boolean add(WeakReference closeable) {
/**
* Adds the given closeable.
- *
+ *
* @param closeable The closeable.
* @return {@code true} iff the closeable was added, {@code false} if it was {@code null} or
* already added before.
@@ -144,13 +169,13 @@ public synchronized boolean add(Closeable closeable) {
/**
* Removes the given closeable.
- *
+ *
* @param closeable The closeable.
* @return {@code true} iff the closeable was removed, {@code fale} if it was {@code null} or not
* previously added.
*/
public synchronized boolean remove(Closeable closeable) {
- if (list == null || closeable == null) {
+ if (list == null || closeable == null || closed) {
return false;
}
for (Iterator> it = list.iterator(); it.hasNext();) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java
index 6ee295499..1ea0a9f69 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketImplShim.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@
/**
* A shim that is filled with Java version-specific overrides. This variant is for Java 9 and above.
- *
+ *
* @author Christian Kohlschütter
*/
abstract class DatagramSocketImplShim extends DatagramSocketImpl {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java
new file mode 100644
index 000000000..f9619357d
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/DatagramSocketShim.java
@@ -0,0 +1,70 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.DatagramSocketImpl;
+import java.net.SocketOption;
+
+abstract class DatagramSocketShim extends DatagramSocket {
+
+ protected DatagramSocketShim(DatagramSocketImpl impl) {
+ super(impl);
+ }
+
+ @Override
+ public T getOption(SocketOption name) throws IOException {
+ if (name instanceof AFSocketOption>) {
+ return getOption((AFSocketOption) name);
+ } else {
+ return super.getOption(name);
+ }
+ }
+
+ @Override
+ public DatagramSocket setOption(SocketOption name, T value) throws IOException {
+ if (name instanceof AFSocketOption>) {
+ return setOption((AFSocketOption) name, value);
+ } else {
+ return super.setOption(name, value);
+ }
+ }
+
+ /**
+ * Returns the value of a junixsocket socket option.
+ *
+ * @param The type of the socket option value.
+ * @param name The socket option.
+ * @return The value of the socket option.
+ * @throws IOException on error.
+ */
+ public abstract T getOption(AFSocketOption name) throws IOException;
+
+ /**
+ * Sets the value of a socket option.
+ *
+ * @param The type of the socket option value.
+ * @param name The socket option.
+ * @param value The value of the socket option.
+ * @return this DatagramSocket.
+ * @throws IOException on error.
+ */
+ @SuppressWarnings("PMD.LinguisticNaming")
+ public abstract DatagramSocket setOption(AFSocketOption name, T value) throws IOException;
+}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java
index 15f5da800..dbad4ae08 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorAccess.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,13 +22,13 @@
/**
* Something that has a {@link FileDescriptor}.
- *
+ *
* @author Christian Kohlschütter
*/
public interface FileDescriptorAccess {
/**
* Returns the corresponding {@link FileDescriptor}.
- *
+ *
* @return The corresponding {@link FileDescriptor}.
* @throws IOException on error.
*/
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java
index e77caa507..6bcb283d1 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/FileDescriptorCast.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,16 +46,16 @@
*
*
* FileDescriptor fd;
- *
+ *
* // succeeds if fd refers to an AF_UNIX stream socket
- * AFUNIXSocket socket = FileDescriptorCast.using(fd).as(AFUNIXSocket.class);
- *
+ * AFUNIXSocket socket = FileDescriptorCast.using(fd).as(AFUNIXSocket.class);
+ *
* // succeeds if fd refers to an AF_UNIX datagram socket
- * AFUNIXDatagramChannel channel = FileDescriptorCast.using(fd).as(AFUNIXDatagramChannel.class);
- *
+ * AFUNIXDatagramChannel channel = FileDescriptorCast.using(fd).as(AFUNIXDatagramChannel.class);
+ *
* // always succeeds
- * InputStream in = FileDescriptorCast.using(fd).as(InputStream.class);
- * OutputStream in = FileDescriptorCast.using(fd).as(OutputStream.class);
+ * InputStream in = FileDescriptorCast.using(fd).as(InputStream.class);
+ * OutputStream in = FileDescriptorCast.using(fd).as(OutputStream.class);
*
*
* IMPORTANT: On some platforms (e.g., Solaris, Illumos) you may need to re-apply a read timeout
@@ -66,18 +66,13 @@
* that do not encode this information directly (such as {@link AFUNIXSocketAddress} and
* {@link AFTIPCSocketAddress}).
*
- *
+ *
* @author Christian Kohlschütter
*/
public final class FileDescriptorCast implements FileDescriptorAccess {
private static final Map, CastingProviderMap> PRIMARY_TYPE_PROVIDERS_MAP = Collections
.synchronizedMap(new HashMap<>());
- private final FileDescriptor fdObj;
-
- private int localPort = 0;
- private int remotePort = 0;
-
private static final Function FD_IS_PROVIDER = System
.getProperty("osv.version") != null ? LenientFileInputStream::new : FileInputStream::new;
@@ -108,7 +103,6 @@ public WritableByteChannel provideAs(FileDescriptorCast fdc,
}
});
addProvider(ReadableByteChannel.class, new CastingProvider() {
- @SuppressWarnings("resource")
@Override
public ReadableByteChannel provideAs(FileDescriptorCast fdc,
Class super ReadableByteChannel> desiredType) throws IOException {
@@ -138,6 +132,25 @@ public FileInputStream provideAs(FileDescriptorCast fdc,
return FD_IS_PROVIDER.apply(fdc.getFileDescriptor());
}
});
+ addProvider(FileDescriptor.class, new CastingProvider() {
+ @Override
+ public FileDescriptor provideAs(FileDescriptorCast fdc,
+ Class super FileDescriptor> desiredType) throws IOException {
+ return fdc.getFileDescriptor();
+ }
+ });
+ addProvider(Integer.class, new CastingProvider() {
+ @Override
+ public Integer provideAs(FileDescriptorCast fdc, Class super Integer> desiredType)
+ throws IOException {
+ FileDescriptor fd = fdc.getFileDescriptor();
+ int val = fd.valid() ? NativeUnixSocket.getFD(fd) : -1;
+ if (val == -1) {
+ throw new IOException("Not a valid file descriptor");
+ }
+ return val;
+ }
+ });
if (AFSocket.supports(AFSocketCapability.CAPABILITY_FD_AS_REDIRECT)) {
addProvider(Redirect.class, new CastingProvider() {
@@ -156,6 +169,15 @@ public Redirect provideAs(FileDescriptorCast fdc, Class super Redirect> desire
}
};
+ private static final int FD_IN = getFdIfPossible(FileDescriptor.in);
+ private static final int FD_OUT = getFdIfPossible(FileDescriptor.out);
+ private static final int FD_ERR = getFdIfPossible(FileDescriptor.err);
+
+ private final FileDescriptor fdObj;
+
+ private int localPort = 0;
+ private int remotePort = 0;
+
private final CastingProviderMap cpm;
private FileDescriptorCast(FileDescriptor fdObj, CastingProviderMap cpm) {
@@ -163,6 +185,20 @@ private FileDescriptorCast(FileDescriptor fdObj, CastingProviderMap cpm) {
this.cpm = Objects.requireNonNull(cpm);
}
+ private static int getFdIfPossible(FileDescriptor fd) {
+ if (!NativeUnixSocket.isLoaded()) {
+ return -1;
+ }
+ try {
+ if (!fd.valid()) {
+ return -1;
+ }
+ return NativeUnixSocket.getFD(fd);
+ } catch (IOException e) {
+ return -1;
+ }
+ }
+
private static void registerCastingProviders(Class> primaryType, CastingProviderMap cpm) {
Objects.requireNonNull(primaryType);
CastingProviderMap prev;
@@ -224,6 +260,7 @@ private abstract static class CastingProviderMap {
private final Map, CastingProvider>> providers = new HashMap<>();
private final Set> classes = Collections.unmodifiableSet(providers.keySet());
+ @SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
protected CastingProviderMap() {
addProviders();
@@ -270,7 +307,7 @@ private interface CastingProvider {
/**
* Creates a {@link FileDescriptorCast} using the given file descriptor.
- *
+ *
* @param fdObj The file descriptor.
* @return The {@link FileDescriptorCast} instance.
* @throws IOException on error, especially if the given file descriptor is invalid or
@@ -291,17 +328,72 @@ public static FileDescriptorCast using(FileDescriptor fdObj) throws IOException
return new FileDescriptorCast(fdObj, map == null ? GLOBAL_PROVIDERS : map);
}
+ /**
+ * Creates a {@link FileDescriptorCast} using the given native file descriptor value.
+ *
+ * This method is inherently unsafe as it may
+ *
+ *
make assumptions on the internal system representation of a file descriptor (which differs
+ * between Windows and Unix, for example).
+ *
provide access to resources that are otherwise not accessible
+ *
+ *
+ * Note that attempts are made to reuse {@link FileDescriptor#in}, {@link FileDescriptor#out}, and
+ * {@link FileDescriptor#err}, respectively.
+ *
+ * @param fd The system-native file descriptor value.
+ * @return The {@link FileDescriptorCast} instance.
+ * @throws IOException on error, especially if the given file descriptor is invalid or
+ * unsupported, or when "unsafe" operations are unavailable or manually disabled for the
+ * current environment.
+ */
+ @Unsafe
+ public static FileDescriptorCast unsafeUsing(int fd) throws IOException {
+ AFSocket.ensureUnsafeSupported();
+
+ FileDescriptor fdObj;
+ if (fd == -1) {
+ throw new IOException("Not a valid file descriptor");
+ } else if (fd == FD_IN) {
+ fdObj = FileDescriptor.in;
+ } else if (fd == FD_OUT) {
+ fdObj = FileDescriptor.out;
+ } else if (fd == FD_ERR) {
+ fdObj = FileDescriptor.err;
+ } else {
+ fdObj = null;
+ }
+
+ if (fdObj != null) {
+ int check = getFdIfPossible(fdObj);
+ if (fd == check) {
+ return using(fdObj);
+ }
+ }
+
+ fdObj = new FileDescriptor();
+ NativeUnixSocket.initFD(fdObj, fd);
+
+ return using(fdObj);
+ }
+
private static void triggerInit() {
- AFUNIXSocketAddress.addressFamily().getClass(); // trigger registration
- AFTIPCSocketAddress.addressFamily().getClass(); // trigger registration
+ for (AFAddressFamily> family : new AFAddressFamily>[] {
+ AFUNIXSocketAddress.addressFamily(), //
+ AFTIPCSocketAddress.addressFamily(), //
+ AFVSOCKSocketAddress.addressFamily(), //
+ AFSYSTEMSocketAddress.addressFamily(), //
+ }) {
+ Objects.requireNonNull(family.getClass()); // trigger init
+ }
}
/**
* Registers the given port number as the "local port" for this file descriptor.
- *
+ *
* Important: This only changes the state of this instance. The actual file descriptor is not
* affected.
- *
+ *
* @param port The port to assign to (must be >= 0).
* @return This instance.
*/
@@ -315,10 +407,10 @@ public FileDescriptorCast withLocalPort(int port) {
/**
* Registers the given port number as the "remote port" for this file descriptor.
- *
+ *
* Important: This only changes the state of this instance. The actual file descriptor is not
* affected.
- *
+ *
* @param port The port to assign to (must be >= 0).
* @return This instance.
*/
@@ -332,7 +424,7 @@ public FileDescriptorCast withRemotePort(int port) {
/**
* Casts this instance to the desired type.
- *
+ *
* @param The desired type.
* @param desiredType The class of the desired type.
* @return s An instance of the desired type.
@@ -357,7 +449,7 @@ public FileDescriptorCast withRemotePort(int port) {
/**
* Checks if the instance can be cast as the given desired type (using {@link #as(Class)}).
- *
+ *
* @param desiredType The class of the desired type.
* @return {@code true} if the cast can be made.
* @throws IOException on error.
@@ -370,7 +462,7 @@ public boolean isAvailable(Class> desiredType) throws IOException {
/**
* Returns a collection of available types this instance can be cast to (using
* {@link #as(Class)}).
- *
+ *
* @return The collection of available types.
*/
public Set> availableTypes() {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java
index ba1782759..01e21991d 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/HostAndPort.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
/**
* Hostname and port.
- *
+ *
* @author Christian Kohlschütter
*/
public final class HostAndPort {
@@ -39,7 +39,7 @@ public final class HostAndPort {
/**
* Creates a new hostname and port combination.
- *
+ *
* @param hostname The hostname.
* @param port The port, or {@code -1} for "no port".
*/
@@ -88,7 +88,7 @@ public String toString() {
/**
* Tries to extract hostname and port information from the given URI.
- *
+ *
* @param u The URI to extract from.
* @return The parsed {@link HostAndPort} instance.
* @throws SocketException on error.
@@ -130,7 +130,7 @@ private static String urlEncode(String s) {
/**
* Returns the hostname.
- *
+ *
* @return The hostname.
*/
public String getHostname() {
@@ -139,7 +139,7 @@ public String getHostname() {
/**
* Returns the port, or {@code -1} for "no port specified".
- *
+ *
* @return The port.
*/
public int getPort() {
@@ -148,7 +148,7 @@ public int getPort() {
/**
* Returns a URI with this hostname and port.
- *
+ *
* @param scheme The scheme to use.
* @return The URI.
*/
@@ -159,7 +159,7 @@ public URI toURI(String scheme) {
/**
* Returns a URI with this hostname and port, potentially reusing other URI parameters from the
* given template URI (authority, path, query, fragment).
- *
+ *
* @param scheme The scheme to use.
* @param template The template. or {@code null}.
* @return The URI.
@@ -192,7 +192,7 @@ public URI toURI(String scheme, URI template) {
/**
* Returns a URI with this hostname and port, potentially using other URI parameters from the
* given set of parameters.
- *
+ *
* @param scheme The scheme to use.
* @param rawAuthority The raw authority field, or {@code null}.
* @param rawPath The raw path field, or {@code null}.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java
index b644cfc37..6123bb27d 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidArgumentSocketException.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
/**
* A {@link SocketException} that may be thrown upon some "invalid argument" being passed into
* native code (i.e., EINVAL is returned).
- *
+ *
* @author Christian Kohlschütter
*/
public class InvalidArgumentSocketException extends InvalidSocketException {
@@ -37,7 +37,7 @@ public InvalidArgumentSocketException() {
/**
* Constructs a new {@link InvalidArgumentSocketException}.
- *
+ *
* @param msg The error message.
*/
public InvalidArgumentSocketException(String msg) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java
index c1aaa8ab8..675c9d39d 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/InvalidSocketException.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
/**
* A {@link SocketException} that may be thrown upon some "invalid" state, mostly detected in native
* code.
- *
+ *
* @author Christian Kohlschütter
* @see InvalidArgumentSocketException
* @see AddressUnavailableSocketException
@@ -40,7 +40,7 @@ public InvalidSocketException() {
/**
* Constructs a new {@link InvalidSocketException}.
- *
+ *
* @param msg The error message.
*/
public InvalidSocketException(String msg) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java
index 647a32914..29d994398 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedInteger.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +27,9 @@
/**
* A "named integer", usually used for constants.
- *
+ *
* See the concrete implementations for usage.
- *
+ *
* @author Christian Kohlschütter
*/
@NonNullByDefault
@@ -57,7 +57,7 @@ public interface HasOfValue {
/**
* Creates a new {@link NamedInteger} instance, without actually naming it. A name of "UNDEFINED"
* is used.
- *
+ *
* @param id The value.
*/
protected NamedInteger(int id) {
@@ -66,7 +66,7 @@ protected NamedInteger(int id) {
/**
* Creates a new {@link NamedInteger} instance.
- *
+ *
* @param name The name.
* @param id The value.
*/
@@ -77,7 +77,7 @@ protected NamedInteger(String name, int id) {
/**
* Returns the name.
- *
+ *
* @return The name.
*/
public final String name() {
@@ -86,7 +86,7 @@ public final String name() {
/**
* Returns the value.
- *
+ *
* @return The value.
*/
public final int value() {
@@ -118,7 +118,7 @@ public final boolean equals(@Nullable Object obj) {
/**
* Ensures that the {@code VALUES} array is configured correctly.
- *
+ *
* @param The instance type.
* @param values The {@code VALUES} array.
* @return The verified {@code VALUES} array.
@@ -135,14 +135,14 @@ protected static final T[] init(T[] values) {
/**
* Constructor for "undefined" values.
- *
+ *
* @param The instance type.
*/
@FunctionalInterface
protected interface UndefinedValueConstructor {
/**
* Creates a new "undefined" value instance.
- *
+ *
* @param id The value.
* @return The instance.
*/
@@ -151,7 +151,7 @@ protected interface UndefinedValueConstructor {
/**
* Returns an instance given an integer value.
- *
+ *
* @param The instance type.
* @param values The {@code VALUES} array.
* @param constr The constructor for undefined values.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java
index af525ded1..e436bbea5 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NamedIntegerBitmask.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
/**
* Describes a 32-bit bitmask that supports named flags.
- *
+ *
* @param The subclass's type itself.
* @author Christian Kohlschütter
*/
@@ -49,7 +49,7 @@ public abstract class NamedIntegerBitmask> impl
/**
* Creates a new named flag.
- *
+ *
* @param name The name of the flag / flag set.
* @param flags The flag value.
*/
@@ -60,7 +60,7 @@ protected NamedIntegerBitmask(@Nullable String name, int flags) {
/**
* Returns the name of the flag / flag set.
- *
+ *
* @return The name.
*/
public final String name() {
@@ -69,7 +69,7 @@ public final String name() {
/**
* Returns the value of the flag / flag set.
- *
+ *
* @return The value.
*/
public final int value() {
@@ -78,7 +78,7 @@ public final int value() {
/**
* Checks if the given flag is set.
- *
+ *
* @param flag The flag to check.
* @return {@code true} iff set.
*/
@@ -95,7 +95,7 @@ public final String toString() {
/**
* Combines two flags / flag sets (use this to implement
* {@link #combineWith(NamedIntegerBitmask)}).
- *
+ *
* @param allFlags The array of all defined flags, expected "none".
* @param flagsNone The "none" flag set.
* @param constr The constructor.
@@ -109,7 +109,7 @@ protected final T combineWith(T[] allFlags, T flagsNone, Constructor constr,
/**
* Combines two flags / flag sets.
- *
+ *
* @param other The other flag / flag set.
* @return An instance combining both.
*/
@@ -118,14 +118,14 @@ protected final T combineWith(T[] allFlags, T flagsNone, Constructor constr,
/**
* Creates a new instance.
- *
+ *
* @param This type.
*/
@FunctionalInterface
protected interface Constructor> {
/**
* Creates a new instance.
- *
+ *
* @param name The name.
* @param flags The flag value.
* @return The instance.
@@ -135,7 +135,7 @@ protected interface Constructor> {
/**
* Returns a {@link NamedIntegerBitmask} instance given a flag value.
- *
+ *
* @param The subclass's type itself.
* @param allFlags The array of all defined flags, expected "none".
* @param flagsNone The "none" flag set.
@@ -167,7 +167,7 @@ protected static final > T resolve(T[] allFlags
/**
* Returns a {@link NamedIntegerBitmask} instance given a series of flags.
- *
+ *
* @param The subclass's type itself.
* @param allFlags The array of all defined flags, expected "none".
* @param flagsNone The "none" flag set.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java
index eb225b1f6..c7d502bf9 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeLibraryLoader.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,11 +24,14 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Locale;
import java.util.Objects;
import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
import com.kohlschutter.annotations.compiletime.SuppressFBWarnings;
@@ -44,7 +47,8 @@ final class NativeLibraryLoader implements Closeable {
private static final List ARCHITECTURE_AND_OS = architectureAndOS();
private static final String LIBRARY_NAME = "junixsocket-native";
- private static boolean loaded = false;
+ private static final AtomicBoolean LOADED = new AtomicBoolean(false);
+ private static final boolean IS_ANDROID = checkAndroid();
static {
String dir = System.getProperty(PROP_LIBRARY_TMPDIR, null);
@@ -56,7 +60,7 @@ final class NativeLibraryLoader implements Closeable {
/**
* Returns the temporary directory where the native library is extracted to; debugging only.
- *
+ *
* @return The temporary directory.
*/
static File tempDir() {
@@ -75,6 +79,12 @@ private List tryProviderClass(String providerClassname, String
public static String getJunixsocketVersion() throws IOException {
// NOTE: This can't easily be tested from within the junixsocket-common Maven build
+
+ String v = BuildProperties.getBuildProperties().get("git.build.version");
+ if (v != null && !v.startsWith("$")) {
+ return v;
+ }
+
return getArtifactVersion(AFSocket.class, "junixsocket-common");
}
@@ -120,7 +130,7 @@ public String toString() {
private static final class StandardLibraryCandidate extends LibraryCandidate {
StandardLibraryCandidate(String version) {
- super(version == null ? null : LIBRARY_NAME + "-" + version);
+ super(version == null ? LIBRARY_NAME : LIBRARY_NAME + "-" + version);
}
@Override
@@ -141,20 +151,19 @@ public void close() {
public String toString() {
return super.toString() + "(standard library path)";
}
-
}
private static final class ClasspathLibraryCandidate extends LibraryCandidate {
private final String artifactName;
- private final InputStream libraryIn;
+ private final URL library;
private final String path;
ClasspathLibraryCandidate(String artifactName, String libraryNameAndVersion, String path,
- InputStream libraryIn) {
+ URL library) {
super(libraryNameAndVersion);
this.artifactName = artifactName;
this.path = path;
- this.libraryIn = libraryIn;
+ this.library = library;
}
@Override
@@ -162,35 +171,63 @@ synchronized String load() throws IOException, LinkageError {
if (libraryNameAndVersion == null) {
return null;
}
- File libFile;
- try {
- libFile = createTempFile("libtmp", System.mapLibraryName(libraryNameAndVersion));
- try (OutputStream out = new FileOutputStream(libFile)) { // NOPMD UseTryWithResources
- byte[] buf = new byte[4096];
- int read;
- while ((read = libraryIn.read(buf)) >= 0) {
- out.write(buf, 0, read);
+
+ File libDir = TEMP_DIR;
+
+ for (int attempt = 0; attempt < 3; attempt++) {
+ File libFile;
+ try {
+ libFile = File.createTempFile("libtmp", System.mapLibraryName(libraryNameAndVersion),
+ libDir);
+ try (InputStream libraryIn = library.openStream();
+ OutputStream out = new FileOutputStream(libFile)) { // NOPMD UseTryWithResources
+ byte[] buf = new byte[4096];
+ int read;
+ while ((read = libraryIn.read(buf)) >= 0) {
+ out.write(buf, 0, read);
+ }
+ }
+ } catch (IOException e) {
+ throw e;
+ }
+
+ try {
+ System.load(libFile.getAbsolutePath());
+ } catch (UnsatisfiedLinkError e) {
+ String message = e.getMessage().toLowerCase(Locale.getDefault());
+ if (!message.contains("perm")) {
+ throw e;
+ }
+
+ // Operation not permitted; permission denied; EPERM...
+ // -> tmp directory may be mounted with "noexec", try loading from user.home, user.dir
+
+ switch (attempt) {
+ case 0:
+ libDir = new File(System.getProperty("user.home", "."));
+ break;
+ case 1:
+ libDir = new File(System.getProperty("user.dir", "."));
+ break;
+ default:
+ throw e;
}
+
+ continue;
} finally {
- libraryIn.close();
+ if (!libFile.delete()) {
+ libFile.deleteOnExit();
+ }
}
- } catch (IOException e) {
- throw e;
- }
- System.load(libFile.getAbsolutePath());
- if (!libFile.delete()) {
- libFile.deleteOnExit();
+
+ // If we reach this, then we were able to load the library
+ break; // NOPMD.AvoidBranchingStatementAsLastInLoop
}
return artifactName + "/" + libraryNameAndVersion;
}
@Override
public void close() {
- try {
- libraryIn.close();
- } catch (IOException e) {
- // ignore
- }
}
@Override
@@ -205,11 +242,10 @@ private synchronized void setLoaded(String library) {
@SuppressFBWarnings("THROWS_METHOD_THROWS_RUNTIMEEXCEPTION")
private static synchronized void setLoaded0(String library) {
- if (!loaded) {
- loaded = true;
+ if (LOADED.compareAndSet(false, true)) {
+ NativeUnixSocket.setLoaded(true);
AFSocket.loadedLibrary = library;
try {
- NativeUnixSocket.initPre();
NativeUnixSocket.init();
} catch (RuntimeException e) {
throw e;
@@ -234,7 +270,7 @@ private Throwable loadLibraryOverride() {
setLoaded(libraryOverride);
return null;
} catch (Exception | LinkageError e) {
- if (Boolean.valueOf(libraryOverrideForce)) {
+ if (Boolean.parseBoolean(libraryOverrideForce)) {
throw e;
}
return e;
@@ -254,15 +290,16 @@ private static Object loadLibrarySyncMonitor() {
}
}
- // NOPMD
@SuppressWarnings("null")
public synchronized void loadLibrary() {
synchronized (loadLibrarySyncMonitor()) { // NOPMD We want to lock this class' classloader.
- if (loaded) {
+ if (LOADED.get()) {
// Already loaded
return;
}
+ NativeUnixSocket.initPre();
+
// set -Dorg.newsclub.net.unix.library.override.force=provided to assume that
// we already have loaded the library via System.load, etc.
if ("provided".equals(System.getProperty(PROP_LIBRARY_OVERRIDE_FORCE, ""))) {
@@ -270,7 +307,19 @@ public synchronized void loadLibrary() {
return;
}
- if (Boolean.valueOf(System.getProperty(PROP_LIBRARY_DISABLE, "false"))) {
+ boolean provided = false;
+ try {
+ NativeUnixSocket.noop();
+ provided = true;
+ } catch (UnsatisfiedLinkError | Exception e) {
+ // expected unless we manually loaded the library
+ }
+ if (provided) {
+ setLoaded("provided");
+ return;
+ }
+
+ if (Boolean.parseBoolean(System.getProperty(PROP_LIBRARY_DISABLE, "false"))) {
throw initCantLoadLibraryError(Collections.singletonList(new UnsupportedOperationException(
"junixsocket disabled by System.property " + PROP_LIBRARY_DISABLE)));
}
@@ -330,11 +379,14 @@ private UnsatisfiedLinkError initCantLoadLibraryError(List suppressed
private List initLibraryCandidates(List suppressedThrowables) {
List candidates = new ArrayList<>();
try {
- candidates.add(new StandardLibraryCandidate(getArtifactVersion(getClass(),
- "junixsocket-common", "junixsocket-core")));
+ String version = getArtifactVersion(getClass(), "junixsocket-common", "junixsocket-core");
+ if (version != null) {
+ candidates.add(new StandardLibraryCandidate(version));
+ }
} catch (Exception e) {
suppressedThrowables.add(e);
}
+
try {
candidates.addAll(tryProviderClass("org.newsclub.lib.junixsocket.custom.NarMetadata",
"junixsocket-native-custom"));
@@ -348,14 +400,25 @@ private List initLibraryCandidates(List suppressedT
suppressedThrowables.add(e);
}
+ candidates.add(new StandardLibraryCandidate(null));
+
return candidates;
}
+ private static String lookupArchProperty(String key, String defaultVal) {
+ return System.getProperty(key, defaultVal).replaceAll("[ /\\\\'\";:\\$]", "");
+ }
+
private static List architectureAndOS() {
- String arch = System.getProperty("os.arch", "UnknownArch").replaceAll("[ /\\\\'\";:\\$]", "");
- String osName = System.getProperty("os.name", "UnknownOS").replaceAll("[ /\\\\'\";:\\$]", "");
+ String arch = lookupArchProperty("os.arch", "UnknownArch");
+ String osName = lookupArchProperty("os.name", "UnknownOS");
List list = new ArrayList<>();
+ if (IS_ANDROID) {
+ // Android identifies itself as os.name="Linux"
+ // let's probe for an Android-specific library first
+ list.add(arch + "-Android");
+ }
list.add(arch + "-" + osName);
if (osName.startsWith("Windows") && !"Windows10".equals(osName)) {
list.add(arch + "-" + "Windows10");
@@ -364,6 +427,33 @@ private static List architectureAndOS() {
return list;
}
+ private static boolean checkAndroid() {
+ String vmName = lookupArchProperty("java.vm.name", "UnknownVM");
+ String vmSpecVendor = lookupArchProperty("java.vm.specification.vendor",
+ "UnknownSpecificationVendor");
+
+ return ("Dalvik".equals(vmName) || vmSpecVendor.contains("Android"));
+ }
+
+ static boolean isAndroid() {
+ return IS_ANDROID;
+ }
+
+ static List getArchitectureAndOS() {
+ return ARCHITECTURE_AND_OS;
+ }
+
+ private static URL validateResourceURL(URL url) {
+ if (url == null) {
+ return null;
+ }
+ try (InputStream in = url.openStream()) {
+ return url;
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
private List findLibraryCandidates(String artifactName,
String libraryNameAndVersion, Class> providerClass) {
String mappedName = System.mapLibraryName(libraryNameAndVersion);
@@ -380,11 +470,11 @@ private List findLibraryCandidates(String artifactName,
for (String prefix : prefixes) {
String path = "/lib/" + archOs + "-" + compiler + "/jni/" + prefix + mappedName;
- InputStream in;
+ URL url;
- in = providerClass.getResourceAsStream(path);
- if (in != null) {
- list.add(new ClasspathLibraryCandidate(artifactName, libraryNameAndVersion, path, in));
+ url = validateResourceURL(providerClass.getResource(path));
+ if (url != null) {
+ list.add(new ClasspathLibraryCandidate(artifactName, libraryNameAndVersion, path, url));
}
// NOTE: we have to try .nodeps version _after_ trying the properly linked one.
@@ -392,10 +482,10 @@ private List findLibraryCandidates(String artifactName,
// with a "symbol lookup error"
String nodepsPath = nodepsPath(path);
if (nodepsPath != null) {
- in = providerClass.getResourceAsStream(nodepsPath);
- if (in != null) {
+ url = validateResourceURL(providerClass.getResource(nodepsPath));
+ if (url != null) {
list.add(new ClasspathLibraryCandidate(artifactName, libraryNameAndVersion,
- nodepsPath, in));
+ nodepsPath, url));
}
}
}
@@ -413,10 +503,6 @@ private String nodepsPath(String path) {
}
}
- private static File createTempFile(String prefix, String suffix) throws IOException {
- return File.createTempFile(prefix, suffix, TEMP_DIR);
- }
-
@Override
public void close() {
}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java
index 18ef5de11..be828626f 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NativeUnixSocket.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
import java.io.FileDescriptor;
import java.io.IOException;
import java.lang.ProcessBuilder.Redirect;
+import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketAddress;
@@ -28,6 +29,8 @@
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.spi.AbstractSelectableChannel;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
import org.newsclub.net.unix.AFSelector.PollFd;
@@ -36,18 +39,20 @@
/**
* JNI connector to native JNI C code.
- *
+ *
* @author Christian Kohlschütter
*/
final class NativeUnixSocket {
- private static boolean loaded;
+ private static final CompletableFuture LOADED = new CompletableFuture<>();
static final int DOMAIN_UNIX = 1;
static final int DOMAIN_TIPC = 30;
static final int DOMAIN_VSOCK = 40;
+ static final int DOMAIN_SYSTEM = 32;
static final int SOCK_STREAM = 1;
static final int SOCK_DGRAM = 2;
+ static final int SOCK_RAW = 3;
static final int SOCK_RDM = 4;
static final int SOCK_SEQPACKET = 5;
@@ -69,20 +74,24 @@ final class NativeUnixSocket {
static final int SOCKETSTATUS_BOUND = 1;
static final int SOCKETSTATUS_CONNECTED = 2;
+ @SuppressWarnings("StaticAssignmentOfThrowable" /* errorprone */)
private static Throwable initError = null;
- @ExcludeFromCodeCoverageGeneratedReport
+ @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable")
private NativeUnixSocket() {
throw new UnsupportedOperationException("No instances");
}
static {
+ boolean loadSuccessful = false;
try (NativeLibraryLoader nll = new NativeLibraryLoader()) {
nll.loadLibrary();
- loaded = true;
+ loadSuccessful = true;
} catch (RuntimeException | Error e) {
initError = e;
- e.printStackTrace(); // keep
+ StackTraceUtil.printStackTraceSevere(e);
+ } finally {
+ setLoaded(loadSuccessful);
}
AFAddressFamily.registerAddressFamily("un", NativeUnixSocket.DOMAIN_UNIX,
@@ -91,10 +100,18 @@ private NativeUnixSocket() {
"org.newsclub.net.unix.AFTIPCSocketAddress");
AFAddressFamily.registerAddressFamily("vsock", NativeUnixSocket.DOMAIN_VSOCK,
"org.newsclub.net.unix.AFVSOCKSocketAddress");
+ AFAddressFamily.registerAddressFamily("system", NativeUnixSocket.DOMAIN_SYSTEM,
+ "org.newsclub.net.unix.AFSYSTEMSocketAddress");
}
static boolean isLoaded() {
- return loaded;
+ boolean loadSuccessful;
+ try {
+ loadSuccessful = LOADED.get();
+ } catch (InterruptedException | ExecutionException e) {
+ loadSuccessful = false;
+ }
+ return loadSuccessful;
}
static void ensureSupported() throws UnsupportedOperationException {
@@ -106,7 +123,7 @@ static void ensureSupported() throws UnsupportedOperationException {
static UnsupportedOperationException unsupportedException() {
if (!isLoaded()) {
return (UnsupportedOperationException) new UnsupportedOperationException(
- "junixsocket is not supported on this platform").initCause(initError);
+ "junixsocket may not be fully supported on this platform").initCause(initError);
} else {
return null;
}
@@ -120,6 +137,11 @@ static void initPre() {
// in some environments, JNI FindClass won't find these classes unless we resolve them first
tryResolveClass(AbstractSelectableChannel.class.getName());
tryResolveClass("java.lang.ProcessBuilder$RedirectPipeImpl");
+ tryResolveClass(InetSocketAddress.class.getName());
+ tryResolveClass(OperationNotSupportedSocketException.class.getName());
+ tryResolveClass(InvalidArgumentSocketException.class.getName());
+ tryResolveClass(AddressUnavailableSocketException.class.getName());
+ tryResolveClass(NoSuchDeviceSocketException.class.getName());
}
private static void tryResolveClass(String className) {
@@ -136,6 +158,13 @@ private static void tryResolveClass(String className) {
@SuppressFBWarnings("THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION")
static native void destroy() throws Exception;
+ /**
+ * Can be used to check (without side-effects) if the library has been loaded.
+ *
+ * Terminates normally if so; throws {@link UnsatisfiedLinkError} if not.
+ */
+ static native void noop();
+
static native int capabilities();
static native byte[] sockname(int domain, FileDescriptor fd, boolean peer);
@@ -161,7 +190,7 @@ static native boolean connect(ByteBuffer sockaddr, int sockaddrLen, FileDescript
/**
* Reads data from an {@link AFSocketImpl}.
- *
+ *
* @param fd The corresponding file descriptor.
* @param buf The buffer to read into, or {@code null} if a single byte should be read.
* @param off The buffer offset.
@@ -177,7 +206,7 @@ static native int read(FileDescriptor fd, byte[] buf, int off, int len, int opti
/**
* Writes data to an {@link AFSocketImpl}.
- *
+ *
* @param fd The corresponding file descriptor.
* @param buf The buffer to write from, or {@code null} if a single byte should be written.
* @param off The buffer offset, or the byte to write if {@code buf} is {@code null}.
@@ -232,7 +261,8 @@ static native void initServerImpl(ServerSocket serverSocket, AFSocketImpl> imp
static native void copyFileDescriptor(FileDescriptor source, FileDescriptor target)
throws IOException;
- static native void attachCloseable(FileDescriptor fdsec, Closeable closeable);
+ static native void attachCloseable(FileDescriptor fdsec, Closeable closeable)
+ throws SocketException;
static native int maxAddressLength();
@@ -285,4 +315,10 @@ static native boolean initPipe(FileDescriptor source, FileDescriptor sink, boole
static native int sockTypeToNative(int type) throws IOException;
static native int vsockGetLocalCID() throws IOException;
+
+ static native int systemResolveCtlId(FileDescriptor fd, String ctlName) throws IOException;
+
+ static void setLoaded(boolean successful) {
+ LOADED.complete(successful);
+ }
}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/NoSuchDeviceSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/NoSuchDeviceSocketException.java
new file mode 100644
index 000000000..2bfe0743c
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/NoSuchDeviceSocketException.java
@@ -0,0 +1,46 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+import java.net.SocketException;
+
+/**
+ * A {@link SocketException} that may be thrown upon some "no such device" condition from native
+ * code (e.g., ENODEV is returned).
+ *
+ * @author Christian Kohlschütter
+ */
+public class NoSuchDeviceSocketException extends InvalidSocketException {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Constructs a new {@link NoSuchDeviceSocketException}.
+ */
+ public NoSuchDeviceSocketException() {
+ super();
+ }
+
+ /**
+ * Constructs a new {@link NoSuchDeviceSocketException}.
+ *
+ * @param msg The error message.
+ */
+ public NoSuchDeviceSocketException(String msg) {
+ super(msg);
+ }
+}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java
index f97dce16c..1e8ed2e73 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/OperationNotSupportedSocketException.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,8 +21,9 @@
/**
* A {@link SocketException} that may be thrown upon some "unsupported operation" condition from
- * native code (e.g., EOPNOTSUPP is returned).
- *
+ * native code (e.g., ENOTSUP, EOPNOTSUPP, EPROTONOSUPPORT, ESOCKTNOSUPPORT, EPFNOSUPPORT,
+ * EAFNOSUPPORT is returned).
+ *
* @author Christian Kohlschütter
*/
public class OperationNotSupportedSocketException extends InvalidSocketException {
@@ -37,7 +38,7 @@ public OperationNotSupportedSocketException() {
/**
* Constructs a new {@link OperationNotSupportedSocketException}.
- *
+ *
* @param msg The error message.
*/
public OperationNotSupportedSocketException(String msg) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/PathUtil.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/PathUtil.java
new file mode 100644
index 000000000..6ff8144d3
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/PathUtil.java
@@ -0,0 +1,48 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+
+/**
+ * Some {@link Path}-related helper methods.
+ *
+ * @author Christian Kohlschütter
+ */
+final class PathUtil {
+ private PathUtil() {
+ throw new IllegalStateException("No instances");
+ }
+
+ /**
+ * Checks if the given path is in the default file system.
+ *
+ * @param p The path.
+ * @return {@code true} if so.
+ */
+ @SuppressWarnings("PMD.CompareObjectsWithEquals")
+ static boolean isPathInDefaultFileSystem(Path p) {
+ FileSystem fs = p.getFileSystem();
+ if (fs != FileSystems.getDefault() || fs.getClass().getModule() != Object.class.getModule()) {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java
index 21b9b26ef..09a80affc 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/RAFChannelProvider.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
/**
* Hack to get a readable AND writable {@link FileChannel} for a {@link FileDescriptor}.
- *
+ *
* @author Christian Kohlschütter
*/
final class RAFChannelProvider extends RandomAccessFile implements FileDescriptorAccess {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java
index 7d0d6e91a..859643eff 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SentinelSocketAddress.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java
index 5c82039fa..b166cd8b7 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressFilter.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
/**
* A filter that takes a {@link SocketAddress}, and potentially changes it, or throws an exception
* if certain criteria are met.
- *
+ *
* @author Christian Kohlschütter
*/
@FunctionalInterface
@@ -31,7 +31,7 @@ public interface SocketAddressFilter {
/**
* Applies the filter on the given address.
- *
+ *
* @param address The address.
* @return The address itself or a changed address.
* @throws IOException on error or if a certain error condition is desired.
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressUtil.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressUtil.java
new file mode 100644
index 000000000..58b208213
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketAddressUtil.java
@@ -0,0 +1,56 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+import java.net.SocketAddress;
+import java.net.SocketException;
+import java.net.UnixDomainSocketAddress;
+import java.util.function.Supplier;
+
+/**
+ * {@link SocketAddress}-related helper methods.
+ *
+ * @author Christian Kohlschütter
+ */
+final class SocketAddressUtil {
+ private SocketAddressUtil() {
+ throw new IllegalStateException("No instances");
+ }
+
+ /**
+ * Try to convert a {@link SocketAddress} that is not a {@link AFSocketAddress} to one that is.
+ *
+ * @param address The address.
+ * @return A supplier for the given address, or {@code null}.
+ */
+ static Supplier supplyAFUNIXSocketAddress(SocketAddress address) {
+ if (address instanceof UnixDomainSocketAddress) {
+ UnixDomainSocketAddress udsa = (UnixDomainSocketAddress) address;
+
+ return () -> {
+ try {
+ return AFUNIXSocketAddress.of(udsa.getPath());
+ } catch (SocketException e) {
+ return null;
+ }
+ };
+ } else {
+ return null;
+ }
+ }
+}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java
index afce7ad58..e882a5d5a 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketClosedException.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
/**
* A {@link SocketException} indicating that a socket was closed or is not open for other reasons.
- *
+ *
* @author Christian Kohlschütter
*/
public final class SocketClosedException extends SocketException {
@@ -36,7 +36,7 @@ public SocketClosedException() {
/**
* Constructs a new {@link SocketClosedException}.
- *
+ *
* @param msg The error message.
*/
public SocketClosedException(String msg) {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java
index c5829ad7b..709827206 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketImplShim.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
/**
* A shim that is filled with Java version-specific overrides. This variant is for Java 9 and above.
- *
+ *
* @author Christian Kohlschütter
*/
abstract class SocketImplShim extends SocketImpl {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java
index ebc58ac13..99a5033e1 100644
--- a/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/SocketOptionsMapper.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
/**
* Maps new SocketOption classes to the old integer-based scheme.
- *
+ *
* @author Christian Kohlschütter
*/
final class SocketOptionsMapper {
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/StackTraceUtil.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/StackTraceUtil.java
new file mode 100644
index 000000000..53172f2c9
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/StackTraceUtil.java
@@ -0,0 +1,49 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+/**
+ * Internal helper class to dump stack traces when deemed appropriate.
+ *
+ * NOTE: For junit testing classes, use {@code kohlschutter-test-util}'s {@code TestStackTraceUtil}.
+ *
+ * @author Christian Kohlschütter
+ */
+public final class StackTraceUtil {
+ private StackTraceUtil() {
+ throw new IllegalStateException("No instances");
+ }
+
+ /**
+ * Print/Log the stack trace of the given Throwable.
+ *
+ * @param t The throwable to log.
+ */
+ public static void printStackTrace(Throwable t) {
+ t.printStackTrace(); // NOPMD
+ }
+
+ /**
+ * Print/Log the stack trace of the given Throwable, marking this entry as a "severe condition".
+ *
+ * @param t The throwable to log.
+ */
+ public static void printStackTraceSevere(Throwable t) {
+ t.printStackTrace(); // NOPMD
+ }
+}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/UngrowableSet.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/UngrowableSet.java
new file mode 100644
index 000000000..50855d087
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/UngrowableSet.java
@@ -0,0 +1,101 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * A {@link Set} that won't allow adding elements.
+ *
+ * @param The element type.
+ * @author Christian Kohlschütter
+ */
+final class UngrowableSet implements Set {
+ private final Set set;
+
+ UngrowableSet(Set set) {
+ this.set = set;
+ }
+
+ @Override
+ public int size() {
+ return set.size();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return set.isEmpty();
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ return set.contains(o);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return set.iterator();
+ }
+
+ @Override
+ public Object[] toArray() {
+ return set.toArray();
+ }
+
+ @Override
+ public E[] toArray(E[] a) {
+ return set.toArray(a);
+ }
+
+ @Override
+ public boolean add(T e) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ return set.remove(o);
+ }
+
+ @Override
+ public boolean containsAll(Collection> c) {
+ return set.containsAll(c);
+ }
+
+ @Override
+ public boolean addAll(Collection extends T> c) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean retainAll(Collection> c) {
+ return set.retainAll(c);
+ }
+
+ @Override
+ public boolean removeAll(Collection> c) {
+ return set.removeAll(c);
+ }
+
+ @Override
+ public void clear() {
+ set.clear();
+ }
+}
diff --git a/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java b/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java
new file mode 100644
index 000000000..0859e2dcb
--- /dev/null
+++ b/junixsocket-common/src/main/java/org/newsclub/net/unix/Unsafe.java
@@ -0,0 +1,41 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Declares some operation "unsafe", which is guarded via
+ * {@link AFSocketCapability#CAPABILITY_UNSAFE}.
+ *
+ * Methods annotated with this type should also call {@link AFSocket#ensureUnsafeSupported()} to
+ * check availability at runtime.
+ *
+ * Based on example code from Netty user
+ * guide for 4.x
+ */
+public class EchoServer {
+ private final AFSocketAddress addr;
+
+ public EchoServer(AFSocketAddress addr) {
+ this.addr = addr;
+ }
+
+ public void run() throws Exception {
+ SelectorProvider provider = AFUNIXSelectorProvider.provider();
+ // SelectorProvider provider = AFTIPCSelectorProvider.provider();
+
+ // We need to specify our custom selector provider here (1), as well as in (3)
+ EventLoopGroup bossGroup = new NioEventLoopGroup(0, (Executor) null, provider); // (1)
+ EventLoopGroup workerGroup = new NioEventLoopGroup(0, (Executor) null, provider); // (1)
+ try {
+ ServerBootstrap b = new ServerBootstrap(); // (2)
+ b.group(bossGroup, workerGroup) //
+ .channelFactory(() -> new NioServerSocketChannel(provider)) // (3)
+ .childHandler(new ChannelInitializer() { // (4)
+ @Override
+ public void initChannel(SocketChannel ch) throws Exception {
+ ch.pipeline().addLast(new EchoServerHandler());
+ }
+ }) //
+ .option(ChannelOption.SO_BACKLOG, 128) // (5)
+ .childOption(ChannelOption.SO_KEEPALIVE, true); // (6)
+
+ // Bind and start to accept incoming connections.
+ ChannelFuture f = b.bind(addr).sync(); // (7)
+
+ // Wait until the server socket is closed.
+ // In this example, this does not happen, but you can do that to gracefully
+ // shut down your server.
+ f.channel().closeFuture().sync();
+ } finally {
+ workerGroup.shutdownGracefully();
+ bossGroup.shutdownGracefully();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ File path = new File("/tmp/nettyecho");
+ if (args.length > 0) {
+ path = new File(args[0]);
+ }
+
+ new EchoServer(AFUNIXSocketAddress.of(path)).run();
+ // new EchoServer(AFTIPCSocketAddress.ofService(Scope.SCOPE_CLUSTER, 128, 3)).run();
+ }
+}
\ No newline at end of file
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/netty/EchoServerHandler.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/netty/EchoServerHandler.java
new file mode 100644
index 000000000..df64ed3ee
--- /dev/null
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/netty/EchoServerHandler.java
@@ -0,0 +1,43 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix.demo.netty;
+
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.channel.ChannelInboundHandlerAdapter;
+
+/**
+ * Handles a server-side channel.
+ *
+ * Based on example code from Netty user
+ * guide for 4.x
+ */
+class EchoServerHandler extends ChannelInboundHandlerAdapter { // (1)
+
+ @Override
+ public void channelRead(ChannelHandlerContext ctx, Object msg) {
+ ctx.write(msg); // (1)
+ ctx.flush(); // (2)
+ }
+
+ @Override
+ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // (4)
+ // Close the connection when an exception is raised.
+ cause.printStackTrace();
+ ctx.close();
+ }
+}
\ No newline at end of file
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java
index 4d4086b1d..102c17284 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientDemo.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,9 +38,9 @@
/**
* Connects to {@code /tmp/junixsocket-http-server.sock} and performs an http request over that
* socket, using the OkHttp HTTP client library.
- *
+ *
* If that socket is bound by {@link NanoHttpdServerDemo}, the expected output is "Hello world".
- *
+ *
* @author Christian Kohlschütter
* @see NanoHttpdServerDemo
*/
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java
index 1e1f9d8d6..5fca3b868 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/okhttp/OkHttpClientTIPCDemo.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,13 +39,14 @@
/**
* Connects to TIPC service 8080.1 and performs an HTTP request over that socket, using the
* OkHttp HTTP client library.
- *
+ *
* If that socket is bound by {@link NanoHttpdServerDemo}, the expected output is "Hello world from
* <hostname>" (start {@link NanoHttpdServerDemo} with {@code --url tipc://8080.1}.
- *
+ *
* @author Christian Kohlschütter
* @see NanoHttpdServerDemo
*/
+@SuppressWarnings("CatchAndPrintStackTrace" /* errorprone */)
public class OkHttpClientTIPCDemo {
public static void main(String[] args) throws IOException, InterruptedException {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java
index 6e3d12d3c..03b7a78b3 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/HelloWorldImpl.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
/**
* The implementation of the very simple {@link HelloWorld} service.
- *
+ *
* @author Christian Kohlschütter
*/
public class HelloWorldImpl implements HelloWorld {
@@ -37,7 +37,7 @@ public class HelloWorldImpl implements HelloWorld {
/**
* Creates a new {@link HelloWorld} implementation.
- *
+ *
* @param naming The naming instance to use.
*/
@SuppressFBWarnings("EI_EXPOSE_REP")
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java
index aef5a3a6a..abc790c85 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClient.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
/**
* A simple RMI client. Locates the RMI registry via AF_UNIX sockets and calls
* {@link HelloWorld#hello()}.
- *
+ *
* @author Christian Kohlschütter
*/
public final class SimpleRMIClient {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java
index 082856410..6e1542081 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIClientActingAsServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,9 +30,10 @@
/**
* A simple RMI client. Locates the RMI registry via AF_UNIX sockets and calls
* {@link HelloWorld#hello()}.
- *
+ *
* @author Christian Kohlschütter
*/
+@SuppressWarnings("CatchAndPrintStackTrace" /* errorprone */)
public final class SimpleRMIClientActingAsServer {
public static void main(String[] args) throws IOException, NotBoundException {
AFUNIXNaming naming = AFUNIXNaming.getInstance();
@@ -57,16 +58,16 @@ public static void main(String[] args) throws IOException, NotBoundException {
System.out.println("Calling HelloWorld...");
System.out.println(obj.hello() + " " + obj.world() + "!");
- /**
+ /*
* Uncommenting the line below keeps this instance running.
- *
+ *
* Try it and run SimpleRMIClient to see the difference.
*/
naming.unexportAndUnbind("world", world);
- /**
+ /*
* Also try to remotely shut down the registry.
- *
+ *
* This will not succeed if the server set {@code naming.setRemoteShutdownAllowed(false)}. See
* {@link SimpleRMIServer}
*/
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java
index c7e73c41f..fea30e84b 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/SimpleRMIServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
/**
* A very simple RMI server. Provides a registry and the implementation of the {@link HelloWorld}
* service.
- *
+ *
* @author Christian Kohlschütter
*/
public final class SimpleRMIServer {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java
index 1c100b131..170356e83 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/WorldImpl.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
/**
* The implementation of the very simple {@link World} service.
- *
+ *
* @author Christian Kohlschütter
*/
public class WorldImpl implements World {
@@ -31,7 +31,7 @@ public class WorldImpl implements World {
/**
* Creates a new {@link World} instance.
- *
+ *
* @param text The text to return upon calling {@link #world()}.
*/
public WorldImpl(String text) {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java
index 991def136..33c216c18 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamClient.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@
/**
* Demonstrates how to read files via FileDescriptors that are exchanged via RMI.
- *
+ *
* @author Christian Kohlschütter
* @see StreamServer
*/
@@ -42,7 +42,7 @@ private StreamClient() {
/**
* {@link StreamClient} command-line tool.
- *
+ *
* @param args Command-line arguments.
* @throws IOException on error.
* @throws NotBoundException if the server cannot be reached.
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java
index b432a7ca9..1e94fe74f 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,14 +24,14 @@
/**
* Demonstrates how to read/write files via FileDescriptors that are exchanged via RMI.
- *
+ *
* This allows reading/writing from and to files that are otherwise not even accessible by the user.
* For example, starting the {@link StreamServer} as root and the {@link StreamClient} as a
* non-privileged user will allow the non-privileged user to read files only accessible to root.
- *
+ *
* NOTE: For obvious security reasons, running this server without modification is not advised for
* anything other than demo purposes.
- *
+ *
* @author Christian Kohlschütter
* @see StreamClient
*/
@@ -42,7 +42,7 @@ private StreamServer() {
/**
* {@link StreamServer} command-line tool.
- *
+ *
* @param args Command-line arguments.
* @throws IOException on error.
* @throws AlreadyBoundException if there was already a server running.
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java
index 6ac3eeb55..a00fb9cc2 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/fd/StreamServiceImpl.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@
/**
* An implementation of {@link StreamService}.
- *
+ *
* @author Christian Kohlschütter
*/
public class StreamServiceImpl implements StreamService, Closeable {
@@ -43,7 +43,7 @@ public class StreamServiceImpl implements StreamService, Closeable {
/**
* Creates a new instance.
- *
+ *
* @param socketFactory The socket factory to use.
* @throws RemoteException on error.
*/
@@ -82,7 +82,7 @@ public RemoteCloseableImpl openForWriting(File path) throws IO
/**
* Checks if the given path may be accessed for reading.
- *
+ *
* @param path The path to check.
* @return {@code true} if permitted.
*/
@@ -92,7 +92,7 @@ protected boolean mayRead(File path) {
/**
* Checks if the given path may be accessed for writing.
- *
+ *
* @param path The path to check.
* @return {@code true} if permitted.
*/
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java
index bd004d294..1848f77e4 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/HelloWorld.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,13 +22,13 @@
/**
* A very simple "hello world" service.
- *
+ *
* @author Christian Kohlschütter
*/
public interface HelloWorld extends Remote {
/**
* Returns "Hello".
- *
+ *
* @return "Hello"
* @throws IOException if the operation fails.
*/
@@ -36,7 +36,7 @@ public interface HelloWorld extends Remote {
/**
* Returns "World" (or something else?).
- *
+ *
* @return "World" (usually)
* @throws IOException if the operation fails.
*/
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java
index 5c56cf14b..90c01ae67 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/StreamService.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,14 +28,14 @@
/**
* The {@link StreamServer}'s RMI service.
- *
+ *
* @author Christian Kohlschütter
* @see StreamServer
*/
public interface StreamService extends Remote {
/**
* Opens the given file for reading.
- *
+ *
* @param path The file to open.
* @return A remote instance for the file.
* @throws IOException on error.
@@ -44,7 +44,7 @@ public interface StreamService extends Remote {
/**
* Opens the given file for writing.
- *
+ *
* @param path The file to open.
* @return A remote instance for the file.
* @throws IOException on error.
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java
index d8f341a0c..2cec6cd21 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/rmi/services/World.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,14 +22,14 @@
/**
* A very simple "world" service.
- *
+ *
* @author Christian Kohlschütter
* @see HelloWorld
*/
public interface World extends Remote {
/**
* Returns "World" (or something else?).
- *
+ *
* @return "World" (usually)
* @throws RemoteException if the operation fails.
*/
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java
index 40338db84..ec8423b84 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ChargenServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
/**
* A multi-threaded unix socket server that implements a TCP-style character generator compliant
* with RFC864.
- *
+ *
* @author Christian Kohlschütter
*/
public final class ChargenServer extends DemoServerBase {
@@ -38,7 +38,7 @@ public final class ChargenServer extends DemoServerBase {
/**
* Defines a TCP-style character generator compliant with RFC864.
- *
+ *
* @see RFC864
*/
private interface Chargen {
@@ -83,9 +83,9 @@ private synchronized Chargen getChargen(Socket socket) throws SocketException {
/**
* A simple chargen implementation.
- *
+ *
* Even though this looks straightforward, it's not the fastest implementation.
- *
+ *
* @see FastChargen
*/
private static final class SimpleChargen implements Chargen {
@@ -113,7 +113,7 @@ public void write(Socket socket) throws IOException {
/**
* A fast chargen implementation, using a pre-built data buffer that is just large enough to
* always send a full array of bytes matching the socket's send buffer capacity.
- *
+ *
* @see SimpleChargen
*/
private static final class FastChargen implements Chargen {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java
index c52f3d14c..da79ef7e9 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/DemoServerBase.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,9 +30,10 @@
/**
* An {@link SocketServer} that's just good for demo purposes.
- *
+ *
* @author Christian Kohlschütter
*/
+@SuppressWarnings("CatchAndPrintStackTrace" /* errorprone */)
abstract class DemoServerBase extends SocketServer {
public DemoServerBase(SocketAddress listenAddress) {
super(listenAddress);
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java
index aac916a28..28bd499fc 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/EchoServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
/**
* A multi-threaded unix socket server that simply echoes all input, byte per byte.
- *
+ *
* @author Christian Kohlschütter
*/
public final class EchoServer extends DemoServerBase {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java
index ac600b8a8..0ce8a9ef3 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/NullServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
/**
* A multi-threaded unix socket server that simply reads all input, byte per byte, not doing
* anything else with it.
- *
+ *
* @author Christian Kohlschütter
*/
public final class NullServer extends DemoServerBase {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java
index 281b52578..afca4da81 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SendFileHandleServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,9 +30,10 @@
/**
* A multi-threaded unix socket server that simply reads all input, byte per byte, not doing
* anything else with it.
- *
+ *
* @author Christian Kohlschütter
*/
+@SuppressWarnings("CatchAndPrintStackTrace" /* errorprone */)
public final class SendFileHandleServer extends DemoServerBase {
private final File file;
@@ -49,7 +50,7 @@ protected void doServeSocket(Socket socket) throws IOException {
doServeSocket((AFUNIXSocket) socket);
}
- protected void doServeSocket(AFUNIXSocket socket) throws IOException {
+ private void doServeSocket(AFUNIXSocket socket) throws IOException {
try (InputStream is = socket.getInputStream();
OutputStream os = socket.getOutputStream();
FileInputStream fin = new FileInputStream(file)) {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java
index a23c742e6..fddf11534 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/SocketServerDemo.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
/**
* A demo program to configure and run several {@link SocketServer} demos from the command line.
- *
+ *
* @author Christian Kohlschütter
*/
public final class SocketServerDemo {
diff --git a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java
index 752f4c55f..32c38a861 100644
--- a/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java
+++ b/junixsocket-demo/src/main/java/org/newsclub/net/unix/demo/server/ZeroServer.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
/**
* A multi-threaded unix socket server that simply writes null-bytes, and does not attempt to read
* anything.
- *
+ *
* @author Christian Kohlschütter
*/
// CPD-OFF
diff --git a/junixsocket-dist/pom.xml b/junixsocket-dist/pom.xml
index 941f9937a..185ad6371 100644
--- a/junixsocket-dist/pom.xml
+++ b/junixsocket-dist/pom.xml
@@ -8,7 +8,7 @@
com.kohlschutter.junixsocketjunixsocket
- 2.6.1
+ 2.7.2../pom.xmljunixsocket-dist
@@ -66,7 +66,6 @@
org.apache.maven.pluginsmaven-assembly-plugin
- 3.1.1build-dist
diff --git a/junixsocket-jetty-12/pom.xml b/junixsocket-jetty-12/pom.xml
new file mode 100644
index 000000000..1020e2cc1
--- /dev/null
+++ b/junixsocket-jetty-12/pom.xml
@@ -0,0 +1,91 @@
+
+
+ 4.0.0
+ junixsocket-jetty-12
+ jar
+
+ com.kohlschutter.junixsocket
+ junixsocket
+ 2.7.2
+ ../pom.xml
+
+ junixsocket-jetty
+
+ ${project.parent.basedir}
+ 12.0.1
+
+
+ junixsocket for Jetty 12 (currently test-only; use
+ junixsocket-jetty as a dependency)
+
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-core
+ ${project.version}
+ pom
+
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-jetty
+ ${project.version}
+ test
+
+
+ org.eclipse.jetty
+ jetty-server
+
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty.version}
+ provided
+
+
+
+ org.slf4j
+ slf4j-simple
+ 2.0.9
+ test
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.11.0
+ test
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-common
+ ${project.version}
+ tests
+ test
+
+
+ org.eclipse.jetty
+ jetty-client
+ ${jetty.version}
+ test
+
+
+
+ org.hamcrest
+ hamcrest
+ 2.2
+ test
+
+
+
diff --git a/junixsocket-jetty-12/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java b/junixsocket-jetty-12/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
new file mode 100644
index 000000000..84804d5c0
--- /dev/null
+++ b/junixsocket-jetty-12/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
@@ -0,0 +1,356 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2022 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//
+// ========================================================================
+// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others.
+//
+// This program and the accompanying materials are made available under the
+// terms of the Eclipse Public License v. 2.0 which is available at
+// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
+// which is available at https://www.apache.org/licenses/LICENSE-2.0.
+//
+// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
+// ========================================================================
+//
+
+package org.eclipse.jetty.unixdomain.server;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.SocketAddress;
+import java.net.SocketException;
+import java.nio.ByteBuffer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Objects;
+import java.util.Random;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.jetty.client.ContentResponse;
+import org.eclipse.jetty.client.HttpClient;
+import org.eclipse.jetty.client.HttpProxy;
+import org.eclipse.jetty.client.ProxyProtocolClientConnectionFactory.V1;
+import org.eclipse.jetty.client.ProxyProtocolClientConnectionFactory.V2;
+import org.eclipse.jetty.client.transport.HttpClientTransportDynamic;
+import org.eclipse.jetty.http.HttpHeader;
+import org.eclipse.jetty.http.HttpStatus;
+import org.eclipse.jetty.http.HttpURI;
+import org.eclipse.jetty.io.ClientConnector;
+import org.eclipse.jetty.server.ConnectionFactory;
+import org.eclipse.jetty.server.ConnectionMetaData;
+import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.ProxyConnectionFactory;
+import org.eclipse.jetty.server.Request;
+import org.eclipse.jetty.server.Response;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.util.Callback;
+import org.eclipse.jetty.util.component.LifeCycle;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.newsclub.net.unix.AFSocketAddress;
+import org.newsclub.net.unix.AFUNIXSocketAddress;
+import org.newsclub.net.unix.jetty.AFSocketClientConnector;
+import org.newsclub.net.unix.jetty.AFSocketServerConnector;
+
+public class UnixDomainTest {
+ private static final Class> unixDomainSocketAddressClass = probe();
+
+ private static Class> probe() {
+ try {
+ return ClassLoader.getPlatformClassLoader().loadClass("java.net.UnixDomainSocketAddress");
+ } catch (Throwable x) {
+ return null;
+ }
+ }
+
+ private ConnectionFactory[] factories = new ConnectionFactory[] {new HttpConnectionFactory()};
+ private Server server;
+ private Path unixDomainPath;
+
+ @BeforeAll
+ public static void setUp() {
+ System.setProperty("org.slf4j.simpleLogger.log.org.eclipse.jetty", "error");
+ }
+
+ private void start(Handler handler) throws Exception {
+ server = new Server();
+ // UnixDomainServerConnector connector = new UnixDomainServerConnector(server, factories);
+ AFSocketServerConnector connector = new AFSocketServerConnector(server, factories);
+ String dir = System.getProperty("jetty.unixdomain.dir", System.getProperty("java.io.tmpdir"));
+ assertNotNull(dir);
+ File dirFile = new File(dir);
+ dirFile.mkdirs();
+ unixDomainPath = Files.createTempFile(dirFile.toPath(), "unix_", ".sock");
+ assertTrue(unixDomainPath.toAbsolutePath().toString().length() < 108,
+ "Unix-Domain path too long");
+ Files.delete(unixDomainPath);
+ // connector.setUnixDomainPath(unixDomainPath);
+ connector.setListenSocketAddress(AFUNIXSocketAddress.of(unixDomainPath));
+ server.addConnector(connector);
+ server.setHandler(handler);
+ server.start();
+ }
+
+ @AfterEach
+ public void dispose() {
+ LifeCycle.stop(server);
+ }
+
+ @Test
+ public void testHTTPOverUnixDomain() throws Exception {
+ String uri = "http://localhost:1234/path";
+ start(new Handler.Abstract() {
+
+ @Override
+ public boolean handle(Request request, Response response, Callback callback)
+ throws Exception {
+ // Verify the URI is preserved.
+ assertEquals(uri, request.getHttpURI().toString());
+
+ // Verify the SocketAddresses.
+ ConnectionMetaData connectionMetaData = request.getConnectionMetaData();
+ SocketAddress local = connectionMetaData.getLocalSocketAddress();
+ SocketAddress remote = connectionMetaData.getRemoteSocketAddress();
+
+ assertThat(local, Matchers.instanceOf(AFSocketAddress.class));
+ if (remote != null) {
+ // remote should be null if not connected
+ assertThat(remote, Matchers.instanceOf(AFSocketAddress.class));
+ }
+
+ assertDoesNotThrow(connectionMetaData::toString);
+
+ response.write(true, ByteBuffer.allocate(0), new Callback() {});
+
+ return true;
+ }
+ });
+
+ // ClientConnector clientConnector = ClientConnector.forUnixDomain(unixDomainPath);
+ ClientConnector clientConnector = AFSocketClientConnector.withSocketAddress(AFUNIXSocketAddress
+ .of(unixDomainPath));
+ HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector));
+ httpClient.start();
+ try {
+ ContentResponse response = httpClient.newRequest(uri).timeout(5, TimeUnit.SECONDS).send();
+
+ assertEquals(HttpStatus.OK_200, response.getStatus());
+ } finally {
+ httpClient.stop();
+ }
+ }
+
+ @Test
+ public void testHTTPOverUnixDomainWithHTTPProxy() throws Exception {
+ int fakeProxyPort = 4567;
+ int fakeServerPort = 5678;
+ start(new Handler.Abstract() {
+ @Override
+ public boolean handle(Request request, Response response, Callback callback)
+ throws Exception {
+ // Proxied requests must have an absolute URI.
+ HttpURI uri = request.getHttpURI();
+ assertNotNull(uri.getScheme());
+ assertEquals(fakeServerPort, uri.getPort());
+
+ response.write(true, ByteBuffer.allocate(0), new Callback() {});
+
+ return true;
+ }
+ });
+
+ // ClientConnector clientConnector = ClientConnector.forUnixDomain(unixDomainPath);
+ ClientConnector clientConnector = AFSocketClientConnector.withSocketAddress(AFUNIXSocketAddress
+ .of(unixDomainPath));
+
+ HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector));
+ httpClient.getProxyConfiguration().addProxy(new HttpProxy("localhost", fakeProxyPort));
+ httpClient.start();
+ try {
+ ContentResponse response = httpClient.newRequest("localhost", fakeServerPort).timeout(5,
+ TimeUnit.SECONDS).send();
+
+ assertEquals(HttpStatus.OK_200, response.getStatus());
+ } finally {
+ httpClient.stop();
+ }
+ }
+
+ @Test
+ public void testHTTPOverUnixDomainWithProxyProtocol() throws Exception {
+ String srcAddr = "/proxySrcAddr";
+ String dstAddr = "/proxyDstAddr";
+ factories = new ConnectionFactory[] {new ProxyConnectionFactory(), new HttpConnectionFactory()};
+ start(new Handler.Abstract() {
+ @Override
+ public boolean handle(Request request, Response response, Callback callback)
+ throws Exception {
+ ConnectionMetaData connectionMetaData = request.getConnectionMetaData();
+
+ String target = request.getHttpURI().getPath();
+
+ if ("/v1".equals(target)) {
+ // As PROXYv1 does not support UNIX, the wrapped EndPoint data is used.
+ Path localPath = toUnixDomainPath(connectionMetaData.getLocalSocketAddress());
+ assertThat(localPath, Matchers.equalTo(unixDomainPath));
+ } else if ("/v2".equals(target)) {
+ SocketAddress localSocketAddress = connectionMetaData.getLocalSocketAddress();
+ if (localSocketAddress != null) {
+ assertThat(toUnixDomainPath(localSocketAddress).toString(), Matchers.equalTo(separators(
+ dstAddr)));
+ }
+ SocketAddress remoteSocketAddress = connectionMetaData.getRemoteSocketAddress();
+ if (remoteSocketAddress != null) {
+ assertThat(toUnixDomainPath(remoteSocketAddress).toString(), Matchers.equalTo(
+ separators(srcAddr)));
+ }
+ } else {
+ Assertions.fail("Invalid PROXY protocol version " + target);
+ }
+
+ response.write(true, ByteBuffer.allocate(0), new Callback() {});
+
+ return true;
+ }
+ });
+
+ // Java 11+ portable way to implement SocketChannelWithAddress.Factory.
+ // ClientConnector clientConnector = ClientConnector.forUnixDomain(unixDomainPath);
+ ClientConnector clientConnector = AFSocketClientConnector.withSocketAddress(AFUNIXSocketAddress
+ .of(unixDomainPath));
+
+ HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector));
+ httpClient.start();
+ try {
+ // Try PROXYv1 with the PROXY information retrieved from the EndPoint.
+ // PROXYv1 does not support the UNIX family.
+ ContentResponse response1 = httpClient.newRequest("localhost", 0).path("/v1").tag(
+ new V1.Tag()).timeout(5, TimeUnit.SECONDS).send();
+
+ assertEquals(HttpStatus.OK_200, response1.getStatus());
+
+ // Try PROXYv2 with explicit PROXY information.
+ V2.Tag tag = new V2.Tag(V2.Tag.Command.PROXY, V2.Tag.Family.UNIX, V2.Tag.Protocol.STREAM,
+ srcAddr, 0, dstAddr, 0, null);
+ ContentResponse response2 = httpClient.newRequest("localhost", 0).path("/v2").tag(tag)
+ .timeout(5, TimeUnit.SECONDS).send();
+
+ assertEquals(HttpStatus.OK_200, response2.getStatus());
+ } finally {
+ httpClient.stop();
+ }
+ }
+
+ @Test
+ public void testInvalidUnixDomainPath() {
+ server = new Server();
+ // UnixDomainServerConnector connector = new UnixDomainServerConnector(server, factories);
+ AFSocketServerConnector connector = new AFSocketServerConnector(server, factories);
+
+ // connector.setUnixDomainPath(new File("/does/not/exist").toPath());
+ try {
+ connector.setListenSocketAddress(AFUNIXSocketAddress.of(new File("/does/not/exist")
+ .toPath()));
+ } catch (SocketException e) {
+ throw new IllegalStateException(e);
+ }
+
+ server.addConnector(connector);
+ assertThrows(IOException.class, () -> server.start());
+ }
+
+ private static Path toUnixDomainPath(SocketAddress address) {
+ Objects.requireNonNull(address, "address");
+
+ if (address instanceof AFUNIXSocketAddress) {
+ return new File(((AFUNIXSocketAddress) address).getPath()).toPath();
+ } else if (unixDomainSocketAddressClass != null) {
+ try {
+ return (Path) unixDomainSocketAddressClass.getMethod("getPath").invoke(address);
+ } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException
+ | SecurityException e) {
+ Assertions.fail(e);
+ throw new AssertionError(e);
+ }
+ } else {
+ throw new IllegalStateException("Unsupported socket address class " + address.getClass()
+ + ": " + address);
+ }
+ }
+
+ public static String separators(String path) {
+ StringBuilder ret = new StringBuilder();
+ for (int i = 0, n = path.length(); i < n; i++) {
+ char c = path.charAt(i);
+ if ((c == '/') || (c == '\\')) {
+ ret.append(File.separatorChar);
+ } else {
+ ret.append(c);
+ }
+ }
+ return ret.toString();
+ }
+
+ @Test
+ public void testLargeBody() throws Exception {
+ String uri = "http://localhost:1234/path";
+
+ byte[] payload = new byte[512 * 1024]; // 512k
+ new Random().nextBytes(payload);
+
+ start(new Handler.Abstract() {
+ @Override
+ public boolean handle(Request request, Response response, Callback callback)
+ throws Exception {
+ response.getHeaders().put(HttpHeader.CONTENT_TYPE, "application/octet-stream");
+
+ response.write(true, ByteBuffer.wrap(payload), new Callback() {});
+
+ return true;
+ }
+ });
+
+ // ClientConnector clientConnector = ClientConnector.forUnixDomain(unixDomainPath);
+ ClientConnector clientConnector = AFSocketClientConnector.withSocketAddress(AFUNIXSocketAddress
+ .of(unixDomainPath));
+ HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector));
+ httpClient.start();
+ try {
+ ContentResponse response = httpClient.newRequest(uri).timeout(5, TimeUnit.SECONDS).send();
+
+ assertEquals(HttpStatus.OK_200, response.getStatus());
+ byte[] data = response.getContent();
+ assertArrayEquals(payload, data);
+ } finally {
+ httpClient.stop();
+ }
+ }
+}
\ No newline at end of file
diff --git a/junixsocket-jetty-12/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java b/junixsocket-jetty-12/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java
new file mode 100644
index 000000000..30cde6070
--- /dev/null
+++ b/junixsocket-jetty-12/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java
@@ -0,0 +1,122 @@
+/*
+ * junixsocket
+ *
+ * Copyright 2009-2023 Christian Kohlschütter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.newsclub.net.unix.jetty;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.BufferedReader;
+import java.time.Duration;
+
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.Server;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.newsclub.net.unix.AFSocketAddress;
+import org.newsclub.net.unix.AFSocketFactory;
+import org.newsclub.net.unix.domain.AFUNIXAddressSpecifics;
+
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+public class AFSocketServerConnectorTest {
+ @BeforeAll
+ public static void setUp() {
+ System.setProperty("org.slf4j.simpleLogger.log.org.eclipse.jetty.server", "error");
+ }
+
+ @Test
+ public void testServerAFUNIX() throws Exception {
+ AFSocketAddress addr = (AFSocketAddress) AFUNIXAddressSpecifics.INSTANCE
+ .newTempAddressForDatagram();
+ Server server1 = newServer(addr);
+ checkConnection(addr);
+ assertTrue(server1.isRunning());
+
+ Server server2 = newServer(addr);
+
+ // isDeleteOnClose is smart enough to not delete the wrong socket
+ assertTrue(addr.getFile().exists());
+
+ server1.join();
+ assertFalse(server1.isRunning());
+ server2.stop();
+ server2.join();
+ assertFalse(addr.getFile().exists()); // isDeleteOnClose=true by default
+ }
+
+ private void checkConnection(AFSocketAddress addr) throws Exception {
+ OkHttpClient.Builder builder = new OkHttpClient.Builder() //
+ .socketFactory(new AFSocketFactory.FixedAddressSocketFactory(addr)) //
+ .callTimeout(Duration.ofMinutes(1));
+
+ OkHttpClient client = builder.build();
+
+ Request request = new Request.Builder().url("http://localhost/").build();
+ try (Response response = client.newCall(request).execute()) {
+ assertEquals(404, response.code());
+ assertNotNull(response.header("Server"));
+
+ ResponseBody body = response.body();
+ assertNotNull(body);
+
+ BufferedReader br = new BufferedReader(body.charStream());
+ int l = 0;
+ while (br.readLine() != null) {
+ l++;
+ }
+ assertNotEquals(0, l);
+ }
+ }
+
+ private static Server newServer(AFSocketAddress addr) throws Exception {
+ Server server = new Server();
+
+ // below code is based upon
+ // https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html
+
+ // The number of acceptor threads.
+ int acceptors = 1;
+
+ // The number of selectors.
+ int selectors = 1;
+
+ // Create a ServerConnector instance.
+ AFSocketServerConnector connector = new AFSocketServerConnector(server, acceptors, selectors,
+ new HttpConnectionFactory());
+
+ // The AFSocketAddress to listen to.
+ connector.setListenSocketAddress(addr);
+
+ // The accept queue size.
+ connector.setAcceptQueueSize(128);
+
+ // Try to automatically stop server if another instance reuses our address
+ connector.setMayStopServer(true);
+
+ server.addConnector(connector);
+ server.start();
+
+ return server;
+ }
+}
diff --git a/junixsocket-jetty/pom.xml b/junixsocket-jetty/pom.xml
index be05bc148..0253e1b3f 100644
--- a/junixsocket-jetty/pom.xml
+++ b/junixsocket-jetty/pom.xml
@@ -1,22 +1,39 @@
-
+4.0.0junixsocket-jettyjarcom.kohlschutter.junixsocketjunixsocket
- 2.6.1
+ 2.7.2../pom.xmljunixsocket-jetty${project.parent.basedir}
- 11.0.12
+ 11.0.16junixsocket for Jetty
+
+
+
+
+ org.codehaus.mojo
+ versions-maven-plugin
+
+
+ false
+
+
+
+
+
+
com.kohlschutter.junixsocket
@@ -34,13 +51,13 @@
org.slf4jslf4j-simple
- 2.0.3
+ 2.0.9testcom.squareup.okhttp3okhttp
- 4.10.0
+ 4.11.0test
@@ -56,6 +73,14 @@
${jetty.version}test
+
org.hamcresthamcrest
@@ -63,4 +88,4 @@
test
-
\ No newline at end of file
+
diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java
index 5dee06881..6e7b26b73 100644
--- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java
+++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketClientConnector.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,11 +32,11 @@
/**
* A {@link Connector} implementation for junixsocket server socket channels (Unix domains etc.)
- *
+ *
* Based upon jetty's ClientConnector.
- *
+ *
* This implementation should work with jetty version 10.0.8 or newer.
- *
+ *
* @author Christian Kohlschütter
*/
public final class AFSocketClientConnector extends ClientConnector {
@@ -50,7 +50,7 @@ private AFSocketClientConnector(AFSocketAddress addr) {
/**
* Returns a new {@link ClientConnector} configured to use given {@link AFSocketAddress} for
* communication with junixsocket sockets.
- *
+ *
* @param addr The socket address.
* @return The client connector.
*/
diff --git a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java
index 7991b8186..ac37bb477 100644
--- a/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java
+++ b/junixsocket-jetty/src/main/java/org/newsclub/net/unix/jetty/AFSocketServerConnector.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,11 +50,9 @@
import java.util.EventListener;
import java.util.Locale;
import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
+import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicReference;
-import org.eclipse.jetty.io.ArrayByteBufferPool;
import org.eclipse.jetty.io.ByteBufferPool;
import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint;
@@ -81,12 +79,13 @@
/**
* A {@link Connector} implementation for junixsocket server socket channels (Unix domains etc.)
- *
+ *
* Based upon jetty's UnixDomainServerConnector.
- *
+ *
* This implementation should work with jetty version 9.4.12 or newer.
*/
@ManagedObject
+@SuppressWarnings("PMD.CouplingBetweenObjects")
public class AFSocketServerConnector extends AbstractConnector {
private static final Logger LOG = LoggerFactory.getLogger(AbstractConnector.class);
@@ -100,12 +99,13 @@ public class AFSocketServerConnector extends AbstractConnector {
private int acceptedSendBufferSize;
private boolean mayStopServer = false;
+ private boolean mayStopServerForce = false;
private final Class extends EventListener> selectorManagerListenerClass;
private final Server server;
/**
* Creates a new {@link AFSocketServerConnector}.
- *
+ *
* @param server The server this connector will be added to. Must not be null.
* @param factories The Connection Factories to use.
*/
@@ -115,7 +115,7 @@ public AFSocketServerConnector(Server server, ConnectionFactory... factories) {
/**
* Creates a new {@link AFSocketServerConnector}.
- *
+ *
* @param server The server this connector will be added to. Must not be null.
* @param acceptors the number of acceptor threads to use, or -1 for a default value. If 0, then
* no acceptor threads will be launched and some other mechanism will need to be used to
@@ -130,13 +130,13 @@ public AFSocketServerConnector(Server server, int acceptors, int selectors,
/**
* Creates a new {@link AFSocketServerConnector}.
- *
+ *
* @param server The server this connector will be added to. Must not be null.
* @param executor An executor for this connector or null to use the servers executor
* @param scheduler A scheduler for this connector or null to either a {@link Scheduler} set as a
* server bean or if none set, then a new {@link ScheduledExecutorScheduler} instance.
* @param pool A buffer pool for this connector or null to either a {@link ByteBufferPool} set as
- * a server bean or none set, the new {@link ArrayByteBufferPool} instance.
+ * a server bean or none set, the new {code ArrayByteBufferPool} instance.
* @param acceptors the number of acceptor threads to use, or -1 for a default value. If 0, then
* no acceptor threads will be launched and some other mechanism will need to be used to
* accept new connections.
@@ -144,6 +144,7 @@ public AFSocketServerConnector(Server server, int acceptors, int selectors,
* @param factories The Connection Factories to use.
*/
@SuppressFBWarnings("EI_EXPOSE_REP2")
+ @SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
public AFSocketServerConnector(Server server, Executor executor, Scheduler scheduler,
ByteBufferPool pool, int acceptors, int selectors, ConnectionFactory... factories) {
super(server, executor, scheduler, pool, acceptors, factories.length > 0 ? factories
@@ -172,14 +173,15 @@ private SelectorManager newSelectorManager(Executor executor, Scheduler schedule
/**
* Returns the Unix-Domain path this connector listens to.
- *
+ *
* Added for compatibility with jetty's {@code UnixDomainServerConnector}.
- *
+ *
* @return The Unix-Domain path this connector listens to.
* @deprecated Use {@link #getListenSocketAddress()} instead.
* @see #getListenSocketAddress()
*/
@ManagedAttribute("The Unix-Domain path this connector listens to")
+ @Deprecated
public Path getUnixDomainPath() {
if (listenSocketAddress instanceof AFUNIXSocketAddress) {
AFUNIXSocketAddress addr = (AFUNIXSocketAddress) listenSocketAddress;
@@ -196,13 +198,14 @@ public Path getUnixDomainPath() {
/**
* Sets the Unix-Domain path this connector listens to.
- *
+ *
* Added for compatibility with jetty's {@code UnixDomainServerConnector}.
- *
+ *
* @param unixDomainPath The path.
* @deprecated Use {@link #setListenSocketAddress(AFSocketAddress)} instead.
* @see #setListenSocketAddress(AFSocketAddress)
*/
+ @Deprecated
public void setUnixDomainPath(Path unixDomainPath) {
try {
this.listenSocketAddress = AFUNIXSocketAddress.of(unixDomainPath);
@@ -213,7 +216,7 @@ public void setUnixDomainPath(Path unixDomainPath) {
/**
* Returns the socket address this connector listens to.
- *
+ *
* @return The socket address, or {@code null} if none set.
*/
@ManagedAttribute("The socket address this connector listens to")
@@ -224,7 +227,7 @@ public AFSocketAddress getListenSocketAddress() {
/**
* Sets the socket address this connector listens to.
- *
+ *
* @param addr The socket address, or {@code null}.
*/
@SuppressFBWarnings("EI_EXPOSE_REP2")
@@ -234,7 +237,7 @@ public void setListenSocketAddress(AFSocketAddress addr) {
/**
* Checks whether this connector uses a server channel inherited from the JVM.
- *
+ *
* @return {@code true} if so.
*/
@ManagedAttribute("Whether this connector uses a server channel inherited from the JVM")
@@ -244,7 +247,7 @@ public boolean isInheritChannel() {
/**
* Sets whether this connector uses a server channel inherited from the JVM.
- *
+ *
* @param inheritChannel {@code true} if so.
*/
public void setInheritChannel(boolean inheritChannel) {
@@ -253,7 +256,7 @@ public void setInheritChannel(boolean inheritChannel) {
/**
* Returns the accept queue size (backlog) for the server socket.
- *
+ *
* @return The backlog.
*/
@ManagedAttribute("The accept queue size (backlog) for the server socket")
@@ -263,7 +266,7 @@ public int getAcceptQueueSize() {
/**
* Sets the accept queue size (backlog) for the server socket.
- *
+ *
* @param acceptQueueSize The backlog.
*/
public void setAcceptQueueSize(int acceptQueueSize) {
@@ -272,7 +275,7 @@ public void setAcceptQueueSize(int acceptQueueSize) {
/**
* Returns the SO_RCVBUF size for accepted sockets.
- *
+ *
* @return The buffer size.
*/
@ManagedAttribute("The SO_RCVBUF option for accepted sockets")
@@ -282,7 +285,7 @@ public int getAcceptedReceiveBufferSize() {
/**
* Sets the SO_RCVBUF size for accepted sockets.
- *
+ *
* @param acceptedReceiveBufferSize The buffer size.
*/
public void setAcceptedReceiveBufferSize(int acceptedReceiveBufferSize) {
@@ -291,7 +294,7 @@ public void setAcceptedReceiveBufferSize(int acceptedReceiveBufferSize) {
/**
* Returns the SO_SNDBUF size for accepted sockets.
- *
+ *
* @return The buffer size.
*/
@ManagedAttribute("The SO_SNDBUF option for accepted sockets")
@@ -301,7 +304,7 @@ public int getAcceptedSendBufferSize() {
/**
* Sets the SO_SNDBUF size for accepted sockets.
- *
+ *
* @param acceptedSendBufferSize The buffer size.
*/
public void setAcceptedSendBufferSize(int acceptedSendBufferSize) {
@@ -342,45 +345,35 @@ protected void accept(int acceptorID) throws IOException {
takenOver = !((AFServerSocketChannel>) sc).isLocalSocketAddressValid();
}
- if (takenOver) {
- ExecutorService es = Executors.newSingleThreadExecutor();
- try {
- LOG.warn("Another server has taken over our address");
- es.execute(() -> {
- Connector[] connectors = server.getConnectors();
-
- boolean shutdownServer;
- if (connectors == null) {
- shutdownServer = true;
- } else {
- shutdownServer = true;
- for (Connector conn : connectors) {
- if (conn != AFSocketServerConnector.this && conn.isRunning()) { // NOPMD.CompareObjectsWithEquals
- shutdownServer = false;
- break;
- }
- }
- }
-
- if (shutdownServer && mayStopServer) {
- LOG.warn("Server has no other connectors; shutting down: " + server); // NOPMD
-
- try {
- server.stop();
- } catch (Exception e1) {
- LOG.warn("Exception upon stopping " + server, e1); // NOPMD
- }
- }
- });
- } finally {
- es.shutdown();
- }
+ if (takenOver && isMayStopServer()) {
+ LOG.warn("Another server has taken over our address");
+ ForkJoinPool.commonPool().execute(this::checkServerStop);
}
throw (ClosedByInterruptException) new ClosedByInterruptException().initCause(e);
}
}
}
+ private void checkServerStop() {
+ Connector[] connectors = server.getConnectors();
+
+ if (connectors != null && !isMayStopServerForce()) {
+ for (Connector conn : connectors) {
+ if (conn != AFSocketServerConnector.this && conn.isRunning()) { // NOPMD.CompareObjectsWithEquals
+ return; // don't stop
+ }
+ }
+ }
+
+ LOG.warn("Server has no other connectors; shutting down: " + server); // NOPMD
+
+ try {
+ server.stop();
+ } catch (Exception e1) {
+ LOG.warn("Exception upon stopping " + server, e1); // NOPMD
+ }
+ }
+
private void accepted(SocketChannel channel) throws IOException {
channel.configureBlocking(false);
configure(channel);
@@ -390,7 +383,7 @@ private void accepted(SocketChannel channel) throws IOException {
/**
* Configures an incoming {@link SocketChannel}, setting socket options such as receive and send
* buffer sizes.
- *
+ *
* @param channel The socket channel to configure.
* @throws IOException on error.
*/
@@ -533,7 +526,7 @@ protected void endPointClosed(EndPoint endpoint) {
/**
* Checks if this connector may stop the server when it's no longer able to serve and no other
* connectors are available.
- *
+ *
* @return {@code true} if so.
*/
@ManagedAttribute("Whether this connector may stop the server when it's no longer able to"
@@ -545,10 +538,35 @@ public boolean isMayStopServer() {
/**
* Sets if this connector may stop the server when it's no longer able to serve and no other
* connectors are available.
- *
+ *
* @param mayStopServer {@code true} if so.
*/
public void setMayStopServer(boolean mayStopServer) {
this.mayStopServer = mayStopServer;
}
+
+ /**
+ * Checks if this connector may stop the server when it's no longer able to serve, even if other
+ * connectors are available.
+ *
+ * @return {@code true} if so.
+ */
+ @ManagedAttribute("Whether this connector may stop the server when it's no longer able to"
+ + " serve, even if other connectors are available")
+ public boolean isMayStopServerForce() {
+ return mayStopServerForce;
+ }
+
+ /**
+ * Sets if this connector may stop the server when it's no longer able to serve and no other
+ * connectors are available.
+ *
+ * @param b {@code true} if so (which then also implies {@code setMayStopServer(true)}
+ */
+ public void setMayStopServerForce(boolean b) {
+ if (b) {
+ setMayStopServer(true);
+ }
+ this.mayStopServerForce = b;
+ }
}
diff --git a/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java b/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
index 78b2027e5..8a5dd61ee 100644
--- a/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
+++ b/junixsocket-jetty/src/test/java/org/eclipse/jetty/unixdomain/server/UnixDomainTest.java
@@ -31,6 +31,7 @@
package org.eclipse.jetty.unixdomain.server;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -45,6 +46,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Objects;
+import java.util.Random;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.client.HttpClient;
@@ -75,6 +77,7 @@
import org.newsclub.net.unix.jetty.AFSocketClientConnector;
import org.newsclub.net.unix.jetty.AFSocketServerConnector;
+import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@@ -193,7 +196,7 @@ public void handle(String target, Request jettyRequest, HttpServletRequest reque
.of(unixDomainPath));
HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector));
- httpClient.getProxyConfiguration().getProxies().add(new HttpProxy("localhost", fakeProxyPort));
+ httpClient.getProxyConfiguration().addProxy(new HttpProxy("localhost", fakeProxyPort));
httpClient.start();
try {
ContentResponse response = httpClient.newRequest("localhost", fakeServerPort).timeout(5,
@@ -308,7 +311,8 @@ private static Path toUnixDomainPath(SocketAddress address) {
public static String separators(String path) {
StringBuilder ret = new StringBuilder();
- for (char c : path.toCharArray()) {
+ for (int i = 0, n = path.length(); i < n; i++) {
+ char c = path.charAt(i);
if ((c == '/') || (c == '\\')) {
ret.append(File.separatorChar);
} else {
@@ -317,4 +321,40 @@ public static String separators(String path) {
}
return ret.toString();
}
+
+ @Test
+ public void testLargeBody() throws Exception {
+ String uri = "http://localhost:1234/path";
+
+ byte[] payload = new byte[512 * 1024]; // 512k
+ new Random().nextBytes(payload);
+
+ start(new AbstractHandler() {
+ @Override
+ public void handle(String target, Request jettyRequest, HttpServletRequest request,
+ HttpServletResponse response) throws IOException {
+ jettyRequest.setHandled(true);
+
+ response.setContentType(" application/octet-stream");
+ try (ServletOutputStream out = response.getOutputStream()) {
+ out.write(payload);
+ }
+ }
+ });
+
+ // ClientConnector clientConnector = ClientConnector.forUnixDomain(unixDomainPath);
+ ClientConnector clientConnector = AFSocketClientConnector.withSocketAddress(AFUNIXSocketAddress
+ .of(unixDomainPath));
+ HttpClient httpClient = new HttpClient(new HttpClientTransportDynamic(clientConnector));
+ httpClient.start();
+ try {
+ ContentResponse response = httpClient.newRequest(uri).timeout(5, TimeUnit.SECONDS).send();
+
+ assertEquals(HttpStatus.OK_200, response.getStatus());
+ byte[] data = response.getContent();
+ assertArrayEquals(payload, data);
+ } finally {
+ httpClient.stop();
+ }
+ }
}
\ No newline at end of file
diff --git a/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java b/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java
index 7f281526f..30cde6070 100644
--- a/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java
+++ b/junixsocket-jetty/src/test/java/org/newsclub/net/unix/jetty/AFSocketServerConnectorTest.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/junixsocket-mysql/pom.xml b/junixsocket-mysql/pom.xml
index bacd7f4a3..485bb3520 100644
--- a/junixsocket-mysql/pom.xml
+++ b/junixsocket-mysql/pom.xml
@@ -6,7 +6,7 @@
com.kohlschutter.junixsocketjunixsocket
- 2.6.1
+ 2.7.2../pom.xmljunixsocket-mysql
@@ -23,9 +23,10 @@
${project.version}
- mysql
- mysql-connector-java
- 8.0.30
+
+ com.mysql
+ mysql-connector-j
+ 8.1.0provided
diff --git a/junixsocket-mysql/src/main/java/module-info.java b/junixsocket-mysql/src/main/java/module-info.java
index 300b929d6..ed6b7ba1f 100644
--- a/junixsocket-mysql/src/main/java/module-info.java
+++ b/junixsocket-mysql/src/main/java/module-info.java
@@ -8,7 +8,8 @@
requires java.sql;
requires java.base;
- requires mysql.connector.java;
+ // requires mysql.connector.java; // until 8.0.30
+ requires transitive mysql.connector.j; // from 8.0.31
requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
diff --git a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java
index 4693d062b..19a725c14 100644
--- a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java
+++ b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactory.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,13 +31,13 @@
/**
* Connect to mysql databases (and compatibles) using UNIX domain sockets.
- *
+ *
* NOTE: This SocketFactory currently implements the "old" Connector/J SocketFactory. This may
* change in the future.
- *
+ *
* For the time being, see AFUNIXDatabaseSocketFactoryCJ to forcibly use the new "CJ"-style
* SocketFactory.
- *
+ *
* @see AFUNIXDatabaseSocketFactoryCJ
*/
@SuppressWarnings("deprecation")
diff --git a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java
index e378ccb41..4749e81ef 100644
--- a/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java
+++ b/junixsocket-mysql/src/main/java/org/newsclub/net/mysql/AFUNIXDatabaseSocketFactoryCJ.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
*/
package org.newsclub.net.mysql;
-import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.net.Socket;
@@ -38,7 +37,6 @@
*/
public class AFUNIXDatabaseSocketFactoryCJ implements SocketFactory {
private AFUNIXSocket rawSocket;
- private Socket sslSocket;
/**
* Creates a new instance.
@@ -46,11 +44,11 @@ public class AFUNIXDatabaseSocketFactoryCJ implements SocketFactory {
public AFUNIXDatabaseSocketFactoryCJ() {
}
- @SuppressWarnings({"unchecked", "exports"})
+ @SuppressWarnings({"unchecked"})
@SuppressFBWarnings("EI_EXPOSE_REP")
@Override
- public T connect(String hostname, int portNumber, PropertySet props,
- int loginTimeout) throws IOException {
+ public Socket connect(String hostname, int portNumber, PropertySet props, int loginTimeout)
+ throws IOException {
// Adjust the path to your MySQL socket by setting the
// "junixsocket.file" property
// If no socket path is given, use the default: /tmp/mysql.sock
@@ -64,17 +62,15 @@ public T connect(String hostname, int portNumber, Property
final File socketFile = new File(sock);
this.rawSocket = AFUNIXSocket.connectTo(AFUNIXSocketAddress.of(socketFile));
- this.sslSocket = rawSocket;
- return (T) rawSocket;
+ return rawSocket;
}
- @SuppressWarnings({"unchecked", "exports"})
+ @SuppressWarnings({"unchecked"})
@SuppressFBWarnings("EI_EXPOSE_REP")
@Override
- public T performTlsHandshake(SocketConnection socketConnection,
- ServerSession serverSession) throws IOException {
- this.sslSocket = ExportControlled.performTlsHandshake(this.rawSocket, socketConnection,
+ public Socket performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession)
+ throws IOException {
+ return ExportControlled.performTlsHandshake(this.rawSocket, socketConnection,
serverSession == null ? null : serverSession.getServerVersion(), null);
- return (T) this.sslSocket;
}
}
diff --git a/junixsocket-native-android/META-INF/MANIFEST.MF b/junixsocket-native-android/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..4b797f9d8
--- /dev/null
+++ b/junixsocket-native-android/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Created-By: Maven JAR Plugin 3.3.0
+Build-Jdk-Spec: 20
+Multi-Release: true
+
diff --git a/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/git.properties b/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/git.properties
new file mode 100644
index 000000000..c7e13a5b3
--- /dev/null
+++ b/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/git.properties
@@ -0,0 +1,7 @@
+#Generated by Git-Commit-Id-Plugin
+git.build.version=2.7.0-SNAPSHOT
+git.commit.id.abbrev=edf13c8
+git.commit.id.describe=junixsocket-2.6.2-46-gedf13c8-dirty
+git.commit.id.full=edf13c8c86092b6094ad7443c5a8cee2bec9aa96
+git.commit.time=2023-06-17T17\:30\:21+02\:00
+git.dirty=true
diff --git a/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/pom.properties b/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/pom.properties
new file mode 100644
index 000000000..4d210ef64
--- /dev/null
+++ b/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/pom.properties
@@ -0,0 +1,3 @@
+artifactId=junixsocket-native-android
+groupId=com.kohlschutter.junixsocket
+version=2.7.0-SNAPSHOT
diff --git a/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/pom.xml b/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/pom.xml
new file mode 100644
index 000000000..5bd5a6112
--- /dev/null
+++ b/junixsocket-native-android/META-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-android/pom.xml
@@ -0,0 +1,74 @@
+
+
+ 4.0.0
+ junixsocket-native-android
+
+ jar
+
+
+ com.kohlschutter.junixsocket
+ junixsocket
+ 2.7.0-SNAPSHOT
+ ../pom.xml
+
+ junixsocket-native-android
+
+ ${project.parent.basedir}
+ aar
+
+
+ Native junixsocket libraries for Android
+
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-common
+ ${project.version}
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-native
+ ${project.version}
+ aarch64-Android-clang-llvm-jni
+ nar
+
+
+
+
+
+ release
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+ build-aar
+ package
+
+ jar
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+ true
+
+
+
+
+
diff --git a/junixsocket-native-android/pom.xml b/junixsocket-native-android/pom.xml
new file mode 100644
index 000000000..06c8321d6
--- /dev/null
+++ b/junixsocket-native-android/pom.xml
@@ -0,0 +1,164 @@
+
+
+ 4.0.0
+ junixsocket-native-android
+
+ pom
+
+
+ com.kohlschutter.junixsocket
+ junixsocket
+ 2.7.2
+ ../pom.xml
+
+ junixsocket-native-android
+
+ ${project.parent.basedir}
+ ${project.name}-${project.version}.aar
+
+
+ Native junixsocket libraries for Android
+
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-common
+ ${project.version}
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-native
+ ${project.version}
+ aarch64-Android-clang-llvm-jni
+ nar
+ provided
+ true
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-native
+ ${project.version}
+ x86_64-Android-clang-llvm-jni
+ nar
+ provided
+ true
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-native
+ ${project.version}
+ i686-Android-clang-llvm-jni
+ nar
+ provided
+ true
+
+
+ com.kohlschutter.junixsocket
+ junixsocket-native
+ ${project.version}
+ arm-Android-clang-llvm-jni
+ nar
+ provided
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ multirelease-jar
+ none
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack-nars
+ package
+
+ unpack-dependencies
+
+
+ **/lib*.so
+ nar
+ ${project.build.directory}
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+ build-aar
+ package
+
+ single
+
+
+
+ src/assembly/aar.xml
+
+ ${aarFinalName}
+ false
+ false
+
+
+
+
+
+ com.kohlschutter.mavenplugins
+ copy-rename-maven-plugin
+
+
+ rename-zip-to-aar
+ package
+
+ rename
+
+
+
+ ${project.build.directory}/${aarFinalName}.zip
+
+ ${project.build.directory}/${aarFinalName}
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ add-aar
+ package
+
+ attach-artifact
+
+
+
+
+
+ ${project.build.directory}/${aarFinalName}
+
+ aar
+
+
+
+
+
+
+
+
+
diff --git a/junixsocket-native-android/src/aar/AndroidManifest.xml b/junixsocket-native-android/src/aar/AndroidManifest.xml
new file mode 100644
index 000000000..0d7dd678f
--- /dev/null
+++ b/junixsocket-native-android/src/aar/AndroidManifest.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/junixsocket-native-android/src/aar/R.txt b/junixsocket-native-android/src/aar/R.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/junixsocket-native-android/src/aar/classes.jar b/junixsocket-native-android/src/aar/classes.jar
new file mode 100644
index 000000000..84e5ed105
Binary files /dev/null and b/junixsocket-native-android/src/aar/classes.jar differ
diff --git a/junixsocket-native-android/src/assembly/aar.xml b/junixsocket-native-android/src/assembly/aar.xml
new file mode 100644
index 000000000..1b9cc6a28
--- /dev/null
+++ b/junixsocket-native-android/src/assembly/aar.xml
@@ -0,0 +1,51 @@
+
+ aar
+
+
+ zip
+
+
+ false
+ false
+
+
+
+ ${project.basedir}/src/aar
+
+
+ *
+
+
+
+ res
+
+ **/*
+
+
+
+
+
+
+ ${project.build.directory}/lib/aarch64-Android-clang/jni/libjunixsocket-native-${project.version}.so
+ jni/arm64-v8a
+ libjunixsocket-native.so
+
+
+ ${project.build.directory}/lib/x86_64-Android-clang/jni/libjunixsocket-native-${project.version}.so
+ jni/x86_64
+ libjunixsocket-native.so
+
+
+ ${project.build.directory}/lib/i686-Android-clang/jni/libjunixsocket-native-${project.version}.so
+ jni/x86
+ libjunixsocket-native.so
+
+
+ ${project.build.directory}/lib/arm-Android-clang/jni/libjunixsocket-native-${project.version}.so
+ jni/armeabi-v7a
+ libjunixsocket-native.so
+
+
+
diff --git a/junixsocket-native-common/pom.xml b/junixsocket-native-common/pom.xml
index 49bf4aaaf..cbaefbae5 100644
--- a/junixsocket-native-common/pom.xml
+++ b/junixsocket-native-common/pom.xml
@@ -7,7 +7,7 @@
com.kohlschutter.junixsocketjunixsocket
- 2.6.1
+ 2.7.2../pom.xmljunixsocket-native-common
@@ -164,6 +164,17 @@
runtimetrue
+
- 2.6.1
+ 2.7.2../pom.xmljunixsocket-native-cross
@@ -366,6 +366,138 @@
+
+ crosscompile-aarch64-Android-clang
+
+ run
+
+
+ ${junixsocket.cross.disabled}
+ true
+ true
+
+ clean
+ install
+
+ ${project.basedir}/../
+
+ junixsocket-native
+
+
+ llvm
+
+
+ aarch64-Android-clang
+ true
+ ${project.build.directory}/junixsocket-native-aarch64-Android-clang-llvm
+ aarch64-linux-android30
+ so
+ aarch64-Android-clang-llvm-jni
+ ${ignorant}
+ ${gpgkeyname}
+ ${gpg.executable}
+
+
+
+
+ crosscompile-x86_64-Android-clang
+
+ run
+
+
+ ${junixsocket.cross.disabled}
+ true
+ true
+
+ clean
+ install
+
+ ${project.basedir}/../
+
+ junixsocket-native
+
+
+ llvm
+
+
+ x86_64-Android-clang
+ true
+ ${project.build.directory}/junixsocket-native-x86_64-Android-clang-llvm
+ x86_64-linux-android30
+ so
+ x86_64-Android-clang-llvm-jni
+ ${ignorant}
+ ${gpgkeyname}
+ ${gpg.executable}
+
+
+
+
+ crosscompile-i686-Android-clang
+
+ run
+
+
+ ${junixsocket.cross.disabled}
+ true
+ true
+
+ clean
+ install
+
+ ${project.basedir}/../
+
+ junixsocket-native
+
+
+ llvm
+
+
+ i686-Android-clang
+ true
+ ${project.build.directory}/junixsocket-native-i686-Android-clang-llvm
+ i686-linux-android30
+ so
+ i686-Android-clang-llvm-jni
+ ${ignorant}
+ ${gpgkeyname}
+ ${gpg.executable}
+
+
+
+
+ crosscompile-arm-Android-clang
+
+ run
+
+
+ ${junixsocket.cross.disabled}
+ true
+ true
+
+ clean
+ install
+
+ ${project.basedir}/../
+
+ junixsocket-native
+
+
+ llvm
+
+
+ arm-Android-clang
+ true
+ ${project.build.directory}/junixsocket-native-arm-Android-clang-llvm
+ arm-linux-androideabi30
+ so
+ arm-Android-clang-llvm-jni
+ ${ignorant}
+ ${gpgkeyname}
+ ${gpg.executable}
+
+
+
- 2.6.1
+ 2.7.2../pom.xmljunixsocket-native-custom
diff --git a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java
index 4613c7e5a..90c999be0 100644
--- a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java
+++ b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/NarMetadata.java
@@ -1,7 +1,7 @@
/*
* junixsocket
*
- * Copyright 2009-2022 Christian Kohlschütter
+ * Copyright 2009-2023 Christian Kohlschütter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,11 +21,11 @@
/**
* Marker class to find native libraries in the classpath.
- *
+ *
* @author Christian Kohlschütter
*/
public final class NarMetadata {
- @ExcludeFromCodeCoverageGeneratedReport
+ @ExcludeFromCodeCoverageGeneratedReport(reason = "unreachable")
private NarMetadata() {
throw new IllegalStateException("No instances");
}
diff --git a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java
index 068069722..6d0528155 100644
--- a/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java
+++ b/junixsocket-native-custom/src/main/java/org/newsclub/lib/junixsocket/custom/package-info.java
@@ -1,11 +1,11 @@
/**
* Helper package to identify the Maven artifact with JNI libraries for specific architectures.
- *
+ *
* There are multiple artifacts with the same identifier (junixsocket-native), one per architecture.
- *
+ *
* If you want to run junixsocket on your architecture, you need to make sure that the correct one
* is in the classpath.
- *
+ *
* See "junixsocket-native-common" for an artifact containing the commonly used architectures.
*/
package org.newsclub.lib.junixsocket.custom;
diff --git a/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json
new file mode 100644
index 000000000..3ca368701
--- /dev/null
+++ b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/reflect-config.json
@@ -0,0 +1,5 @@
+[
+{
+ "name":"org.newsclub.lib.junixsocket.custom.NarMetadata"
+}
+]
diff --git a/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json
new file mode 100644
index 000000000..6ea5af423
--- /dev/null
+++ b/junixsocket-native-custom/src/main/resources/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-custom/resource-config.json
@@ -0,0 +1,9 @@
+{
+ "resources":{
+ "includes":[
+ {
+ "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-custom/pom.properties\\E"
+ }
+ ]},
+ "bundles":[]
+}
\ No newline at end of file
diff --git a/junixsocket-native-graalvm/bin/build-selftest b/junixsocket-native-graalvm/bin/build-selftest
index 396095776..7e82759aa 100755
--- a/junixsocket-native-graalvm/bin/build-selftest
+++ b/junixsocket-native-graalvm/bin/build-selftest
@@ -8,6 +8,8 @@
#
cd "$(dirname $0)/../"
+[[ -n "$GRAALVM_HOME" ]] && export PATH="$GRAALVM_HOME"/bin:$PATH
+
java -version 2>&1 | grep -q GraalVM
if [[ $? -ne 0 ]]; then
echo Error: JVM is not a GraalVM. >&2
diff --git a/junixsocket-native-graalvm/bin/graalvm b/junixsocket-native-graalvm/bin/graalvm
deleted file mode 100755
index d06e042bd..000000000
--- a/junixsocket-native-graalvm/bin/graalvm
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-java -version 2>&1 | grep -q GraalVM
-if [[ $? -eq 0 ]]; then
- exec $@
-fi
-
-# FIXME auto-detect
-export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.2.0/Contents/Home
-export PATH=$JAVA_HOME/bin:$PATH
-exec $@
diff --git a/junixsocket-native-graalvm/bin/with-graalvm b/junixsocket-native-graalvm/bin/with-graalvm
new file mode 100755
index 000000000..4f5389a26
--- /dev/null
+++ b/junixsocket-native-graalvm/bin/with-graalvm
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+#
+# junixsocket
+# Copyright 2009-2022 Christian Kohlschütter
+# SPDX-License-Identifier: Apache-2.0
+#
+# Script to detect and enable GraalVM.
+#
+# When run without arguments, an eval-able string like "GRAALVM_HOME=/path/to/graalvm" is emitted.
+# Otherwise, the arguments are executed with the determined GraalVM in path (GRAALVM_HOME, JAVA_HOME and PATH set accordingly).
+#
+java -version 2>&1 | grep -q GraalVM
+if [[ $? -eq 0 ]]; then
+ exec $@
+fi
+
+if [[ -z "$GRAALVM_HOME" ]]; then
+ for d in $(find /Library/Java/JavaVirtualMachines /usr/lib/jvm -maxdepth 1 -type d -name "*graalvm*" 2>/dev/null | sort -r); do
+ if [[ -e "$d/bin/java" ]]; then
+ export GRAALVM_HOME="$d"
+ break
+ elif [[ -e "$d/Contents/Home/bin/java" ]]; then
+ export GRAALVM_HOME="$d/Contents/Home"
+ break
+ fi
+ done
+fi
+
+if [[ -z "$GRAALVM_HOME" ]]; then
+ echo "Error: Could not determine GRAALVM_HOME -- Please set manually" >&2
+ exit 1
+else
+ if [[ $# -eq 0 ]]; then
+ echo "GRAALVM_HOME=$GRAALVM_HOME"
+ fi
+fi
+
+export JAVA_HOME="$GRAALVM_HOME"
+export PATH=$JAVA_HOME/bin:$PATH
+exec -- $@
diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/jni-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/jni-config.json
index 50078f6a3..966feab12 100644
--- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/jni-config.json
+++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/jni-config.json
@@ -8,6 +8,10 @@
"name":"java.lang.Boolean",
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }]
},
+{
+ "name":"java.lang.Class",
+ "methods":[{"name":"getName","parameterTypes":[] }]
+},
{
"name":"java.lang.IllegalStateException",
"methods":[{"name":"","parameterTypes":["java.lang.String"] }]
@@ -18,15 +22,16 @@
},
{
"name":"java.lang.Integer",
- "methods":[
- {"name":"","parameterTypes":["int"] },
- {"name":"intValue","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":["int"] }, {"name":"intValue","parameterTypes":[] }]
},
{
"name":"java.lang.NullPointerException",
"methods":[{"name":"","parameterTypes":["java.lang.String"] }]
},
+{
+ "name":"java.lang.Object",
+ "methods":[{"name":"getClass","parameterTypes":[] }]
+},
{
"name":"java.lang.ProcessBuilder$RedirectPipeImpl",
"fields":[{"name":"fd"}],
@@ -34,24 +39,19 @@
},
{
"name":"java.lang.String",
- "methods":[
- {"name":"lastIndexOf","parameterTypes":["int"] },
- {"name":"substring","parameterTypes":["int"] }
- ]
+ "methods":[{"name":"lastIndexOf","parameterTypes":["int"] }, {"name":"substring","parameterTypes":["int"] }]
},
{
"name":"java.lang.System",
- "methods":[
- {"name":"getProperty","parameterTypes":["java.lang.String"] },
- {"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }
- ]
+ "methods":[{"name":"getProperty","parameterTypes":["java.lang.String"] }, {"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }]
},
{
"name":"java.net.DatagramSocket"
},
{
"name":"java.net.InetSocketAddress",
- "fields":[{"name":"holder"}]
+ "fields":[{"name":"holder"}],
+ "methods":[{"name":"","parameterTypes":["int"] }]
},
{
"name":"java.net.InetSocketAddress$InetSocketAddressHolder",
@@ -86,14 +86,7 @@
},
{
"name":"org.newsclub.net.unix.AFSelector$PollFd",
- "fields":[
- {"name":"fds"},
- {"name":"ops"},
- {"name":"rops"}
- ]
-},
-{
- "name":"org.newsclub.net.unix.AFTIPCSocketAddress"
+ "fields":[{"name":"fds"}, {"name":"ops"}, {"name":"rops"}]
},
{
"name":"org.newsclub.net.unix.AFUNIXDatagramSocket"
@@ -109,11 +102,7 @@
},
{
"name":"org.newsclub.net.unix.AFUNIXSocketCredentials",
- "fields":[
- {"name":"gids"},
- {"name":"pid"},
- {"name":"uid"}
- ],
+ "fields":[{"name":"gids"}, {"name":"pid"}, {"name":"uid"}],
"methods":[{"name":"setUUID","parameterTypes":["java.lang.String"] }]
},
{
@@ -122,15 +111,8 @@
},
{
"name":"org.newsclub.net.unix.AncillaryDataSupport",
- "fields":[
- {"name":"ancillaryReceiveBuffer"},
- {"name":"pendingFileDescriptors"}
- ],
- "methods":[
- {"name":"receiveFileDescriptors","parameterTypes":["int[]"] },
- {"name":"setTipcDestName","parameterTypes":["int","int","int"] },
- {"name":"setTipcErrorInfo","parameterTypes":["int","int"] }
- ]
+ "fields":[{"name":"ancillaryReceiveBuffer"}, {"name":"pendingFileDescriptors"}],
+ "methods":[{"name":"receiveFileDescriptors","parameterTypes":["int[]"] }, {"name":"setTipcDestName","parameterTypes":["int","int","int"] }, {"name":"setTipcErrorInfo","parameterTypes":["int","int"] }]
},
{
"name":"org.newsclub.net.unix.InvalidArgumentSocketException",
@@ -144,19 +126,19 @@
"name":"org.newsclub.net.unix.StdinSocketApp",
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
},
+{
+ "name":"org.newsclub.net.unix.darwin.system.AFSYSTEMDatagramSocket"
+},
+{
+ "name":"org.newsclub.net.unix.darwin.system.AFSYSTEMSocket"
+},
{
"name":"org.newsclub.net.unix.selftest.Selftest",
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
},
{
"name":"org.newsclub.net.unix.tipc.AFTIPCGroupRequest",
- "methods":[
- {"name":"fromNative","parameterTypes":["int","int","int","int"] },
- {"name":"getFlagsValue","parameterTypes":[] },
- {"name":"getInstance","parameterTypes":[] },
- {"name":"getScopeId","parameterTypes":[] },
- {"name":"getType","parameterTypes":[] }
- ]
+ "methods":[{"name":"fromNative","parameterTypes":["int","int","int","int"] }, {"name":"getFlagsValue","parameterTypes":[] }, {"name":"getInstance","parameterTypes":[] }, {"name":"getScopeId","parameterTypes":[] }, {"name":"getType","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.vsock.AFVSOCKDatagramSocket"
diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json
index a0f66c8c9..9b9c4944b 100644
--- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json
+++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/reflect-config.json
@@ -1,4 +1,20 @@
[
+{
+ "name":"com.kohlschutter.testutil.AvailabilityExecutionCondition",
+ "methods":[{"name":"","parameterTypes":[] }]
+},
+{
+ "name":"com.kohlschutter.testutil.AvailabilityRequirement",
+ "queryAllPublicMethods":true
+},
+{
+ "name":"com.kohlschutter.testutil.ExecutionEnvironmentExecutionCondition",
+ "methods":[{"name":"","parameterTypes":[] }]
+},
+{
+ "name":"com.kohlschutter.testutil.ExecutionEnvironmentRequirement",
+ "queryAllPublicMethods":true
+},
{
"name":"com.kohlschutter.testutil.ProcessUtilCondition",
"methods":[{"name":"","parameterTypes":[] }]
@@ -10,12 +26,41 @@
{
"name":"java.lang.ProcessBuilder$RedirectPipeImpl"
},
+{
+ "name":"java.lang.Thread",
+ "fields":[{"name":"threadLocalRandomProbe"}]
+},
+{
+ "name":"java.net.InetSocketAddress"
+},
+{
+ "name":"java.net.UnixDomainSocketAddress"
+},
{
"name":"java.nio.channels.spi.AbstractSelectableChannel"
},
{
"name":"java.security.SecureRandomParameters"
},
+{
+ "name":"java.util.concurrent.ForkJoinTask",
+ "fields":[{"name":"aux"}, {"name":"status"}]
+},
+{
+ "name":"java.util.concurrent.atomic.AtomicBoolean",
+ "fields":[{"name":"value"}]
+},
+{
+ "name":"java.util.concurrent.atomic.AtomicReference",
+ "fields":[{"name":"value"}]
+},
+{
+ "name":"java.util.concurrent.atomic.Striped64",
+ "fields":[{"name":"base"}, {"name":"cellsBusy"}]
+},
+{
+ "name":"jdk.internal.misc.Unsafe"
+},
{
"name":"org.apiguardian.api.API",
"queryAllPublicMethods":true
@@ -54,6 +99,10 @@
{
"name":"org.newsclub.lib.junixsocket.custom.NarMetadata"
},
+{
+ "name":"org.newsclub.net.unix.AFSYSTEMSocketAddress",
+ "methods":[{"name":"addressFamily","parameterTypes":[] }]
+},
{
"name":"org.newsclub.net.unix.AFSocketCapabilityCondition",
"methods":[{"name":"","parameterTypes":[] }]
@@ -73,16 +122,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testGeneric","parameterTypes":[] },
- {"name":"testParseFail","parameterTypes":[] },
- {"name":"testSchemesAvailable","parameterTypes":[] },
- {"name":"testServiceRangeURI","parameterTypes":[] },
- {"name":"testServiceURI","parameterTypes":[] },
- {"name":"testSocatString","parameterTypes":[] },
- {"name":"testSocketURI","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testGeneric","parameterTypes":[] }, {"name":"testParseFail","parameterTypes":[] }, {"name":"testSchemesAvailable","parameterTypes":[] }, {"name":"testServiceRangeURI","parameterTypes":[] }, {"name":"testServiceURI","parameterTypes":[] }, {"name":"testSocatString","parameterTypes":[] }, {"name":"testSocketURI","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.AFUNIXSocketAddress",
@@ -95,18 +135,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testAbstractNamespace","parameterTypes":[] },
- {"name":"testFileScheme","parameterTypes":[] },
- {"name":"testHttpUnix","parameterTypes":[] },
- {"name":"testParseURIandBack","parameterTypes":[] },
- {"name":"testSchemesAvailable","parameterTypes":[] },
- {"name":"testSocatString","parameterTypes":[] },
- {"name":"testURITemplate","parameterTypes":[] },
- {"name":"testURITemplateWithPortNumber","parameterTypes":[] },
- {"name":"testUnixScheme","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testAbstractNamespace","parameterTypes":[] }, {"name":"testFileScheme","parameterTypes":[] }, {"name":"testHttpUnix","parameterTypes":[] }, {"name":"testParseURIandBack","parameterTypes":[] }, {"name":"testSchemesAvailable","parameterTypes":[] }, {"name":"testSerialize","parameterTypes":[] }, {"name":"testSocatString","parameterTypes":[] }, {"name":"testURITemplate","parameterTypes":[] }, {"name":"testURITemplateWithPortNumber","parameterTypes":[] }, {"name":"testUnixScheme","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.AFVSOCKSocketAddress",
@@ -118,11 +147,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testAcceptWithoutBindToService","parameterTypes":[] },
- {"name":"testCatchTimeout","parameterTypes":[] },
- {"name":"testTimeoutAfterDelay","parameterTypes":[] }
- ]
+ "methods":[{"name":"testAcceptWithoutBindToService","parameterTypes":[] }, {"name":"testCatchTimeout","parameterTypes":[] }, {"name":"testTimeoutAfterDelay","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.AncillaryMessageTest",
@@ -137,10 +162,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testAvailableAtClient","parameterTypes":[] },
- {"name":"testAvailableAtServer","parameterTypes":[] }
- ]
+ "methods":[{"name":"testAvailableAtClient","parameterTypes":[] }, {"name":"testAvailableAtServer","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.BufferOverflowTest",
@@ -148,13 +170,16 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"readOutOfBounds","parameterTypes":[] },
- {"name":"readUpTo","parameterTypes":[] },
- {"name":"setUp","parameterTypes":[] },
- {"name":"tearDown","parameterTypes":[] },
- {"name":"writeOverflow","parameterTypes":[] }
- ]
+ "methods":[{"name":"readOutOfBounds","parameterTypes":[] }, {"name":"readUpTo","parameterTypes":[] }, {"name":"setUp","parameterTypes":[] }, {"name":"tearDown","parameterTypes":[] }, {"name":"writeOverflow","parameterTypes":[] }]
+},
+{
+ "name":"org.newsclub.net.unix.BuildPropertiesTest",
+ "allDeclaredFields":true,
+ "allDeclaredClasses":true,
+ "queryAllDeclaredMethods":true,
+ "queryAllPublicMethods":true,
+ "queryAllDeclaredConstructors":true,
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testHasProperties","parameterTypes":[] }, {"name":"testNotEmpty","parameterTypes":[] }, {"name":"testResolved","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.CancelAcceptTest",
@@ -170,11 +195,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testBindConnect","parameterTypes":[] },
- {"name":"testPeekTimeout","parameterTypes":[] },
- {"name":"testReadTimeout","parameterTypes":[] }
- ]
+ "methods":[{"name":"testBindConnect","parameterTypes":[] }, {"name":"testPeekTimeout","parameterTypes":[] }, {"name":"testReadTimeout","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.EndOfFileTest",
@@ -182,17 +203,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"bidirectionalSanity","parameterTypes":[] },
- {"name":"clientReadEof","parameterTypes":[] },
- {"name":"clientWriteToSocketClosedByClient","parameterTypes":[] },
- {"name":"clientWriteToSocketClosedByServer","parameterTypes":[] },
- {"name":"serverReadEof","parameterTypes":[] },
- {"name":"serverWriteToSocketClosedByClient","parameterTypes":[] },
- {"name":"serverWriteToSocketClosedByServer","parameterTypes":[] },
- {"name":"setUp","parameterTypes":[] },
- {"name":"tearDown","parameterTypes":[] }
- ]
+ "methods":[{"name":"bidirectionalSanity","parameterTypes":[] }, {"name":"clientReadEof","parameterTypes":[] }, {"name":"clientWriteToSocketClosedByClient","parameterTypes":[] }, {"name":"clientWriteToSocketClosedByServer","parameterTypes":[] }, {"name":"serverReadEof","parameterTypes":[] }, {"name":"serverWriteToSocketClosedByClient","parameterTypes":[] }, {"name":"serverWriteToSocketClosedByServer","parameterTypes":[] }, {"name":"setUp","parameterTypes":[] }, {"name":"tearDown","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.FileDescriptorCastTest",
@@ -201,14 +212,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testAvailableTypes","parameterTypes":[] },
- {"name":"testInvalidFileDescriptor","parameterTypes":[] },
- {"name":"testPipe","parameterTypes":[] },
- {"name":"testRandomAccessFile","parameterTypes":[] },
- {"name":"testStdout","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testAvailableTypes","parameterTypes":[] }, {"name":"testCastAsInteger","parameterTypes":[] }, {"name":"testInvalidFileDescriptor","parameterTypes":[] }, {"name":"testPipe","parameterTypes":[] }, {"name":"testRandomAccessFile","parameterTypes":[] }, {"name":"testStdout","parameterTypes":[] }, {"name":"testUnsafeCast","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.InetAddressTest",
@@ -217,13 +221,10 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testFromToBytes","parameterTypes":[] },
- {"name":"testHostnameString","parameterTypes":[] },
- {"name":"testHostnameStringEndsWithJunixSocket","parameterTypes":[] },
- {"name":"testIsLoopbackAddress","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testFromToBytes","parameterTypes":[] }, {"name":"testHostnameString","parameterTypes":[] }, {"name":"testHostnameStringEndsWithJunixSocket","parameterTypes":[] }, {"name":"testIsLoopbackAddress","parameterTypes":[] }]
+},
+{
+ "name":"org.newsclub.net.unix.OperationNotSupportedSocketException"
},
{
"name":"org.newsclub.net.unix.PipeTest",
@@ -232,11 +233,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testPipe","parameterTypes":[] },
- {"name":"testPipeRecvHang","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testPipe","parameterTypes":[] }, {"name":"testPipeRecvHang","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.ReadWriteTest",
@@ -244,12 +241,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testReceiveDataByteForByteSendByteForByte","parameterTypes":[] },
- {"name":"testReceiveDataByteForByteSendWithByteArray","parameterTypes":[] },
- {"name":"testReceiveWithByteArraySendByteForByte","parameterTypes":[] },
- {"name":"testReceiveWithByteArraySendWithByteArray","parameterTypes":[] }
- ]
+ "methods":[{"name":"testReceiveDataByteForByteSendByteForByte","parameterTypes":[] }, {"name":"testReceiveDataByteForByteSendWithByteArray","parameterTypes":[] }, {"name":"testReceiveWithByteArraySendByteForByte","parameterTypes":[] }, {"name":"testReceiveWithByteArraySendWithByteArray","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SelectorTest",
@@ -257,20 +249,11 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testCancelSelect","parameterTypes":[] },
- {"name":"testClosedSelectorSelect","parameterTypes":[] },
- {"name":"testClosedSelectorWakeup","parameterTypes":[] },
- {"name":"testConnectionCloseEventualClientDisconnect","parameterTypes":[] },
- {"name":"testConnectionCloseEventualClientDisconnectKeepLooping","parameterTypes":[] },
- {"name":"testConnectionCloseImmediateClientDisconnect","parameterTypes":[] },
- {"name":"testConnectionCloseImmediateClientDisconnectKeepLooping","parameterTypes":[] },
- {"name":"testNonBlockingAccept","parameterTypes":[] }
- ]
+ "methods":[{"name":"testCancelSelect","parameterTypes":[] }, {"name":"testClosedSelectorSelect","parameterTypes":[] }, {"name":"testClosedSelectorWakeup","parameterTypes":[] }, {"name":"testConnectionCloseEventualClientDisconnect","parameterTypes":[] }, {"name":"testConnectionCloseEventualClientDisconnectKeepLooping","parameterTypes":[] }, {"name":"testConnectionCloseImmediateClientDisconnect","parameterTypes":[] }, {"name":"testConnectionCloseImmediateClientDisconnectKeepLooping","parameterTypes":[] }, {"name":"testNonBlockingAccept","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SelftestDiagnosticsHelper",
- "methods":[{"name":"initError","parameterTypes":[] }]
+ "methods":[{"name":"buildProperties","parameterTypes":[] }, {"name":"initError","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.ServerSocketCloseTest",
@@ -278,10 +261,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testUnblockAcceptsWithSoTimeout","parameterTypes":[] },
- {"name":"testUnblockAcceptsWithoutSoTimeout","parameterTypes":[] }
- ]
+ "methods":[{"name":"testUnblockAcceptsWithSoTimeout","parameterTypes":[] }, {"name":"testUnblockAcceptsWithoutSoTimeout","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.ServerSocketTest",
@@ -289,11 +269,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testBindBadArguments","parameterTypes":[] },
- {"name":"testCloseable","parameterTypes":[] },
- {"name":"testUnboundServerSocket","parameterTypes":[] }
- ]
+ "methods":[{"name":"testBindBadArguments","parameterTypes":[] }, {"name":"testCloseable","parameterTypes":[] }, {"name":"testUnboundServerSocket","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SoTimeoutTest",
@@ -301,12 +277,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"issue14Fail","parameterTypes":[] },
- {"name":"issue14Pass","parameterTypes":[] },
- {"name":"testSocketTimeoutExceptionRead","parameterTypes":[] },
- {"name":"testSocketTimeoutExceptionWrite","parameterTypes":[] }
- ]
+ "methods":[{"name":"issue14Fail","parameterTypes":[] }, {"name":"issue14Pass","parameterTypes":[] }, {"name":"testSocketTimeoutExceptionRead","parameterTypes":[] }, {"name":"testSocketTimeoutExceptionWrite","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SocketChannelTest",
@@ -314,11 +285,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testDoubleBindAddressNotReusable","parameterTypes":[] },
- {"name":"testDoubleBindAddressReusable","parameterTypes":[] },
- {"name":"testNonBlockingConnect","parameterTypes":[] }
- ]
+ "methods":[{"name":"testByteBufferWithPositionOffset","parameterTypes":[] }, {"name":"testDoubleBindAddressNotReusable","parameterTypes":[] }, {"name":"testDoubleBindAddressReusable","parameterTypes":[] }, {"name":"testNonBlockingConnect","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SocketOptionsTest",
@@ -333,10 +300,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testDatagramPair","parameterTypes":[] },
- {"name":"testSocketPair","parameterTypes":[] }
- ]
+ "methods":[{"name":"testDatagramPair","parameterTypes":[] }, {"name":"testSocketPair","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SocketTest",
@@ -344,12 +308,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testBindBadArguments","parameterTypes":[] },
- {"name":"testCloseable","parameterTypes":[] },
- {"name":"testConnectBadArguments","parameterTypes":[] },
- {"name":"testUnconnectedSocket","parameterTypes":[] }
- ]
+ "methods":[{"name":"testBindBadArguments","parameterTypes":[] }, {"name":"testCloseable","parameterTypes":[] }, {"name":"testConnectBadArguments","parameterTypes":[] }, {"name":"testUnconnectedSocket","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SocketTestBase",
@@ -357,10 +316,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"ensureSocketFileIsDeleted","parameterTypes":[] },
- {"name":"tearDownClass","parameterTypes":[] }
- ]
+ "methods":[{"name":"ensureSocketFileIsDeleted","parameterTypes":[] }, {"name":"tearDownClass","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.StandardSocketOptionsTest",
@@ -368,12 +324,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"afterEach","parameterTypes":[] },
- {"name":"beforeEach","parameterTypes":[] },
- {"name":"testSocketOptions","parameterTypes":[] },
- {"name":"testUnconnectedServerSocketOptions","parameterTypes":[] }
- ]
+ "methods":[{"name":"afterEach","parameterTypes":[] }, {"name":"beforeEach","parameterTypes":[] }, {"name":"testSocketOptions","parameterTypes":[] }, {"name":"testUnconnectedServerSocketOptions","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.TcpNoDelayTest",
@@ -381,10 +332,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testDefaultImpl","parameterTypes":[] },
- {"name":"testStrictImpl","parameterTypes":[] }
- ]
+ "methods":[{"name":"testDefaultImpl","parameterTypes":[] }, {"name":"testStrictImpl","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.ThroughputTest",
@@ -392,16 +340,28 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
- "methods":[
- {"name":"testDatagramChannel","parameterTypes":[] },
- {"name":"testDatagramChannelDirect","parameterTypes":[] },
- {"name":"testDatagramChannelNonBlocking","parameterTypes":[] },
- {"name":"testDatagramChannelNonBlockingDirect","parameterTypes":[] },
- {"name":"testDatagramPacket","parameterTypes":[] },
- {"name":"testSocket","parameterTypes":[] },
- {"name":"testSocketChannel","parameterTypes":[] },
- {"name":"testSocketChannelDirectBuffer","parameterTypes":[] }
- ]
+ "methods":[{"name":"testDatagramChannel","parameterTypes":[] }, {"name":"testDatagramChannelDirect","parameterTypes":[] }, {"name":"testDatagramChannelNonBlocking","parameterTypes":[] }, {"name":"testDatagramChannelNonBlockingDirect","parameterTypes":[] }, {"name":"testDatagramPacket","parameterTypes":[] }, {"name":"testSocket","parameterTypes":[] }, {"name":"testSocketChannel","parameterTypes":[] }, {"name":"testSocketChannelDirectBuffer","parameterTypes":[] }]
+},
+{
+ "name":"org.newsclub.net.unix.darwin.system.AFSYSTEMSelectorProvider"
+},
+{
+ "name":"org.newsclub.net.unix.darwin.system.KernelControlNamesTest",
+ "allDeclaredFields":true,
+ "allDeclaredClasses":true,
+ "queryAllDeclaredMethods":true,
+ "queryAllPublicMethods":true,
+ "queryAllDeclaredConstructors":true,
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testStandardKernelControlNames","parameterTypes":[] }]
+},
+{
+ "name":"org.newsclub.net.unix.darwin.system.UtunTest",
+ "allDeclaredFields":true,
+ "allDeclaredClasses":true,
+ "queryAllDeclaredMethods":true,
+ "queryAllPublicMethods":true,
+ "queryAllDeclaredConstructors":true,
+ "methods":[{"name":"","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.AbstractNamespaceTest",
@@ -472,18 +432,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testDatagramFileChannel","parameterTypes":[] },
- {"name":"testDatagramPorts","parameterTypes":[] },
- {"name":"testDatagramSocket","parameterTypes":[] },
- {"name":"testForkedVMRedirectStdin","parameterTypes":[] },
- {"name":"testServer","parameterTypes":[] },
- {"name":"testSocketPair","parameterTypes":[] },
- {"name":"testSocketPairNative","parameterTypes":[] },
- {"name":"testSocketPorts","parameterTypes":[] },
- {"name":"testUnconnectedServerAsSocket","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testDatagramFileChannel","parameterTypes":[] }, {"name":"testDatagramPorts","parameterTypes":[] }, {"name":"testDatagramSocket","parameterTypes":[] }, {"name":"testForkedVMRedirectStdin","parameterTypes":[] }, {"name":"testServer","parameterTypes":[] }, {"name":"testSocketPair","parameterTypes":[] }, {"name":"testSocketPairNative","parameterTypes":[] }, {"name":"testSocketPorts","parameterTypes":[] }, {"name":"testUnconnectedServerAsSocket","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.FileDescriptorsTest",
@@ -492,18 +441,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testAncillaryReceiveBufferTooSmall","parameterTypes":[] },
- {"name":"testBadFileDescriptor","parameterTypes":[] },
- {"name":"testDatagramSocket","parameterTypes":[] },
- {"name":"testEmptyFileDescriptorArray","parameterTypes":[] },
- {"name":"testFileInputStream","parameterTypes":[] },
- {"name":"testFileInputStreamPartiallyConsumed","parameterTypes":[] },
- {"name":"testNoAncillaryReceiveBuffer","parameterTypes":[] },
- {"name":"testNullFileDescriptorArray","parameterTypes":[] },
- {"name":"testSendRecvFileDescriptors","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testAncillaryReceiveBufferTooSmall","parameterTypes":[] }, {"name":"testBadFileDescriptor","parameterTypes":[] }, {"name":"testDatagramSocket","parameterTypes":[] }, {"name":"testEmptyFileDescriptorArray","parameterTypes":[] }, {"name":"testFileInputStream","parameterTypes":[] }, {"name":"testFileInputStreamPartiallyConsumed","parameterTypes":[] }, {"name":"testNoAncillaryReceiveBuffer","parameterTypes":[] }, {"name":"testNullFileDescriptorArray","parameterTypes":[] }, {"name":"testSendRecvFileDescriptors","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.PeerCredentialsTest",
@@ -512,12 +450,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"ensureSameCreds","parameterTypes":[] },
- {"name":"testDatagramSocket","parameterTypes":[] },
- {"name":"testSocketsSameProcess","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"ensureSameCreds","parameterTypes":[] }, {"name":"testDatagramSocket","parameterTypes":[] }, {"name":"testSocketsSameProcess","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.ReadWriteTest",
@@ -553,10 +486,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testSupported","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testSupported","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.SoTimeoutTest",
@@ -574,16 +504,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testAbstractNamespace","parameterTypes":[] },
- {"name":"testByteConstructor","parameterTypes":[] },
- {"name":"testEmptyAddress","parameterTypes":[] },
- {"name":"testInetAddress","parameterTypes":[] },
- {"name":"testLegacyConstructor","parameterTypes":[] },
- {"name":"testPath","parameterTypes":[] },
- {"name":"testPort","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testAbstractNamespace","parameterTypes":[] }, {"name":"testByteConstructor","parameterTypes":[] }, {"name":"testEmptyAddress","parameterTypes":[] }, {"name":"testInetAddress","parameterTypes":[] }, {"name":"testLargePort","parameterTypes":[] }, {"name":"testLegacyConstructor","parameterTypes":[] }, {"name":"testPath","parameterTypes":[] }, {"name":"testPort","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.SocketChannelTest",
@@ -601,15 +522,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testFactoryArg","parameterTypes":[] },
- {"name":"testSystemProperty","parameterTypes":[] },
- {"name":"testURISchemeCeateSocketThenConnect","parameterTypes":[] },
- {"name":"testURISchemeCeateSocketWithHostnameValidCases","parameterTypes":[] },
- {"name":"testURISchemeCeateSocketWithIllegalArguments","parameterTypes":[] },
- {"name":"testURISchemeCeateSocketWithInvalidHostname","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testFactoryArg","parameterTypes":[] }, {"name":"testSystemProperty","parameterTypes":[] }, {"name":"testURISchemeCeateSocketThenConnect","parameterTypes":[] }, {"name":"testURISchemeCeateSocketWithHostnameValidCases","parameterTypes":[] }, {"name":"testURISchemeCeateSocketWithIllegalArguments","parameterTypes":[] }, {"name":"testURISchemeCeateSocketWithInvalidHostname","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.SocketPairTest",
@@ -627,15 +540,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testLoadedLibrary","parameterTypes":[] },
- {"name":"testMain","parameterTypes":[] },
- {"name":"testReceivedFileDescriptorsUnconnected","parameterTypes":[] },
- {"name":"testSupported","parameterTypes":[] },
- {"name":"testSupports","parameterTypes":[] },
- {"name":"testVersion","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testLoadedLibrary","parameterTypes":[] }, {"name":"testMain","parameterTypes":[] }, {"name":"testReceivedFileDescriptorsUnconnected","parameterTypes":[] }, {"name":"testSupported","parameterTypes":[] }, {"name":"testSupports","parameterTypes":[] }, {"name":"testVersion","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.StandardSocketOptionsTest",
@@ -664,6 +569,23 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"","parameterTypes":[] }]
},
+{
+ "name":"org.newsclub.net.unix.domain.ThroughputTestShim",
+ "allDeclaredFields":true,
+ "allDeclaredClasses":true,
+ "queryAllDeclaredMethods":true,
+ "queryAllPublicMethods":true,
+ "methods":[{"name":"testJEP380","parameterTypes":[] }, {"name":"testJEP380direct","parameterTypes":[] }]
+},
+{
+ "name":"org.newsclub.net.unix.domain.UnixDomainSocketAddressTest",
+ "allDeclaredFields":true,
+ "allDeclaredClasses":true,
+ "queryAllDeclaredMethods":true,
+ "queryAllPublicMethods":true,
+ "queryAllDeclaredConstructors":true,
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testConvertUnixDomainSocketAddress","parameterTypes":[] }]
+},
{
"name":"org.newsclub.net.unix.tipc.AFTIPCSelectorProvider"
},
@@ -834,10 +756,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
- "methods":[
- {"name":"","parameterTypes":[] },
- {"name":"testGetLocalID","parameterTypes":[] }
- ]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"testGetLocalID","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider"
@@ -992,7 +911,11 @@
},
{
"name":"sun.security.provider.NativePRNG",
- "methods":[{"name":"","parameterTypes":[] }]
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"","parameterTypes":["java.security.SecureRandomParameters"] }]
+},
+{
+ "name":"sun.security.provider.NativePRNG$NonBlocking",
+ "methods":[{"name":"","parameterTypes":[] }, {"name":"","parameterTypes":["java.security.SecureRandomParameters"] }]
},
{
"name":"sun.security.provider.SHA",
diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json
index dca265359..1bce2bc9f 100644
--- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json
+++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/resource-config.json
@@ -1,27 +1,17 @@
{
"resources":{
- "includes":[
- {
- "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-common/pom.properties\\E"
- },
- {
- "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-common/pom.properties\\E"
- },
- {
- "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-custom/pom.properties\\E"
- },
- {
- "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-selftest/git.properties\\E"
- },
- {
- "pattern":"\\QMETA-INF/services/org.junit.platform.engine.TestEngine\\E"
- },
- {
- "pattern":"\\QMETA-INF/services/org.junit.platform.launcher.TestExecutionListener\\E"
- },
- {
- "pattern":"\\Qlib/aarch64-MacOSX-clang/jni/libjunixsocket-native-2.6.1-SNAPSHOT.dylib\\E"
- }
- ]},
+ "includes":[{
+ "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-common/pom.properties\\E"
+ }, {
+ "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-common/pom.properties\\E"
+ }, {
+ "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-native-custom/pom.properties\\E"
+ }, {
+ "pattern":"\\QMETA-INF/maven/com.kohlschutter.junixsocket/junixsocket-selftest/git.properties\\E"
+ }, {
+ "pattern":"\\QMETA-INF/services/org.junit.platform.launcher.TestExecutionListener\\E"
+ }, {
+ "pattern":"\\Qlib/aarch64-MacOSX-clang/jni/libjunixsocket-native-2.7.0-SNAPSHOT.dylib\\E"
+ }]},
"bundles":[]
}
\ No newline at end of file
diff --git a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json
index d35fed355..6a715a1a1 100644
--- a/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json
+++ b/junixsocket-native-graalvm/output/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-native-graalvm/serialization-config.json
@@ -1,12 +1,32 @@
{
"types":[
+ {
+ "name":"byte[]"
+ },
+ {
+ "name":"java.lang.String"
+ },
{
"name":"java.net.InetAddress"
},
+ {
+ "name":"java.net.InetSocketAddress"
+ },
+ {
+ "name":"java.net.SocketAddress"
+ },
{
"name":"org.junit.platform.launcher.TestIdentifier$SerializedForm"
+ },
+ {
+ "name":"org.newsclub.net.unix.AFSocketAddress"
+ },
+ {
+ "name":"org.newsclub.net.unix.AFUNIXSocketAddress"
}
],
"lambdaCapturingTypes":[
+ ],
+ "proxies":[
]
}
\ No newline at end of file
diff --git a/junixsocket-native/.gitignore b/junixsocket-native/.gitignore
index 7b9e6c964..4b4506e14 100644
--- a/junixsocket-native/.gitignore
+++ b/junixsocket-native/.gitignore
@@ -1,3 +1,4 @@
/*.xcodeproj/xcuserdata
/*.xcodeproj/project.xcworkspace/xcuserdata
/target-eclipse/
+src/**/*.jar
diff --git a/junixsocket-native/crossclang/bin/clang b/junixsocket-native/crossclang/bin/clang
index 97aa0cfef..5b7e5ddd5 100755
--- a/junixsocket-native/crossclang/bin/clang
+++ b/junixsocket-native/crossclang/bin/clang
@@ -80,6 +80,9 @@ hideUnknownWarningWarnings=0
hasExportDynamic=0
ignoreExportDynamic=0
+hasReproducible=0
+ignoreReproducible=0
+
skipGccArg=0
analyze=0
@@ -111,10 +114,12 @@ while [ $# -gt 0 ]; do
-Xcrossclang-llvm-name ) llvmName="$1"; shift ; skipArg=1 ;;
-Xcrossclang-use-ldshim ) useLdShim=1 ; skipArg=1 ;;
-Xcrossclang-use-gcc=* ) gccMode=1 ; compiler="${v#-Xcrossclang-use-gcc=}" ; skipArg=1 ;;
+ -Xcrossclang-use-clang=* ) compiler="${v#-Xcrossclang-use-clang=}" ; skipArg=1 ;;
-Xcrossclang-output-strip-lib-prefix ) outputStripLibPrefix=1 ; skipArg=1 ;;
-Xcrossclang-ld64-sdk-version ) ld64_sdk_version="$1"; shift ; skipArg=1 ;;
-Xcrossclang-hide-unknown-warning-warnings ) hideUnknownWarningWarnings=1 ; skipArg=1 ;;
-Xcrossclang-ignore-export-dynamic) ignoreExportDynamic=1 ; skipArg=1 ;;
+ -Xcrossclang-ignore-reproducible) ignoreReproducible=1 ; skipArg=1 ;;
# -index-store-path ) shift ; skipArg=1 ;; # if you're hitting this, set "Enable Index-While-Building Functionality=No" in Xcode build settings instead
-filelist ) fileList="$1" ; shift; skipArg=1 ;;
-current_version ) shift ; skipArg=1 ;;
@@ -155,6 +160,8 @@ while [ $# -gt 0 ]; do
-Xlinker )
if [[ "$1" == "-export_dynamic" ]]; then
hasExportDynamic=1
+ elif [[ "$1" == "-reproducible" ]]; then
+ hasReproducible=1
elif [[ -n "$1" ]]; then
clangArgs+=("-Xlinker" "$1")
gccArgs+=("-Xlinker" "$1")
@@ -186,6 +193,11 @@ if [[ $hasExportDynamic -eq 1 && $ignoreExportDynamic -eq 0 ]]; then
gccArgs+=("-Xlinker" "-export_dynamic")
fi
+if [[ $hasReproducible -eq 1 && $ignoreReproducible -eq 0 ]]; then
+ clangArgs+=("-Xlinker" "-reproducible")
+ # gccArgs+=("-Xlinker" "-reproducible")
+fi
+
if [[ $analyze -gt 0 && $gccMode -gt 0 ]]; then
# When using the static code analyzer, switch back to clang
compiler=clang
@@ -262,13 +274,14 @@ if [[ $gccMode -gt 0 ]]; then
clangArgs=( ${gccArgs[@]} )
fi
-whichComp=$(which $compiler)
+whichComp=$(which "$compiler")
if [[ -z "$whichComp" ]]; then
echo "crossclang could not find compiler $compiler in path $PATH, giving up" >&2
exit 1
fi
-clangDir=$(cd $(dirname "$whichComp"); pwd)
+clangDir=$(dirname "$whichComp")
+clangDir=$(cd "$clangDir"; pwd)
if [ "$currentDir" == "$clangDir" ]; then
echo "crossclang detected in PATH. Can't find real clang, giving up" >&2
exit 1
@@ -627,7 +640,7 @@ if [[ $gccMode -gt 0 ]]; then
fi
-compilerBinary="$(which $compiler)"
+compilerBinary=$(which "$compiler")
if [ -z "$compilerBinary" ]; then
echo "Cannot compile -- compiler not found: $compiler" >&2
exit 1
diff --git a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj
index a1bb6f52a..dab2ce37d 100644
--- a/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj
+++ b/junixsocket-native/junixsocket-native.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 50;
+ objectVersion = 53;
objects = {
/* Begin PBXAggregateTarget section */
@@ -13,6 +13,10 @@
buildPhases = (
);
dependencies = (
+ 435B551B2A3F6658001011B8 /* PBXTargetDependency */,
+ 435B54DF2A3F6617001011B8 /* PBXTargetDependency */,
+ 435B54A32A3F65ED001011B8 /* PBXTargetDependency */,
+ 43EE6B472A3B3D0700E6F8F2 /* PBXTargetDependency */,
436B5AF32827E55000574CD4 /* PBXTargetDependency */,
436B5AB928244D5700574CD4 /* PBXTargetDependency */,
43B3E076266756780024822F /* PBXTargetDependency */,
@@ -630,6 +634,156 @@
4355476E28F6E6310042E830 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
4355476F28F6E6310042E830 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
4355477028F6E6310042E830 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
+ 435B546A2A3F65D2001011B8 /* tipc.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E165F27FBB70B00A553EC /* tipc.h */; };
+ 435B546B2A3F65D2001011B8 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C02650AC3200823167 /* jni.h */; };
+ 435B546C2A3F65D2001011B8 /* ancillary.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C52650AB4E00823167 /* ancillary.h */; };
+ 435B546D2A3F65D2001011B8 /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
+ 435B546E2A3F65D2001011B8 /* init.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BE2650AB4D00823167 /* init.h */; };
+ 435B546F2A3F65D2001011B8 /* send.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AA2650AB4A00823167 /* send.h */; };
+ 435B54702A3F65D2001011B8 /* listen.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B12650AB4B00823167 /* listen.h */; };
+ 435B54712A3F65D2001011B8 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A22650AB4900823167 /* config.h */; };
+ 435B54722A3F65D2001011B8 /* socketpair.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DFB6266082000024822F /* socketpair.h */; };
+ 435B54732A3F65D2001011B8 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
+ 435B54742A3F65D2001011B8 /* connect.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A72650AB4A00823167 /* connect.h */; };
+ 435B54752A3F65D2001011B8 /* jniutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A12650AB4900823167 /* jniutil.h */; };
+ 435B54762A3F65D2001011B8 /* socketoptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339D2650AB4900823167 /* socketoptions.h */; };
+ 435B54772A3F65D2001011B8 /* filedescriptors.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AC2650AB4A00823167 /* filedescriptors.h */; };
+ 435B54782A3F65D2001011B8 /* exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A82650AB4A00823167 /* exceptions.h */; };
+ 435B54792A3F65D2001011B8 /* capabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A42650AB4900823167 /* capabilities.h */; };
+ 435B547A2A3F65D2001011B8 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C02650AB4D00823167 /* org_newsclub_net_unix_NativeUnixSocket.h */; };
+ 435B547B2A3F65D2001011B8 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B42650AB4B00823167 /* socket.h */; };
+ 435B547C2A3F65D2001011B8 /* ckmacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BF2650AB4D00823167 /* ckmacros.h */; };
+ 435B547D2A3F65D2001011B8 /* address.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B92650AB4C00823167 /* address.h */; };
+ 435B547E2A3F65D2001011B8 /* polling.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A92650AB4A00823167 /* polling.h */; };
+ 435B547F2A3F65D2001011B8 /* accept.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BB2650AB4C00823167 /* accept.h */; };
+ 435B54802A3F65D2001011B8 /* reflection.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AD2650AB4A00823167 /* reflection.h */; };
+ 435B54812A3F65D2001011B8 /* jniport.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C12650AC3200823167 /* jniport.h */; };
+ 435B54822A3F65D2001011B8 /* receive.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A62650AB4A00823167 /* receive.h */; };
+ 435B54832A3F65D2001011B8 /* credentials.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AE2650AB4A00823167 /* credentials.h */; };
+ 435B54842A3F65D2001011B8 /* bind.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339F2650AB4900823167 /* bind.h */; };
+ 435B54862A3F65D2001011B8 /* filedescriptors.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C42650AB4E00823167 /* filedescriptors.c */; };
+ 435B54872A3F65D2001011B8 /* bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C32650AB4D00823167 /* bind.c */; };
+ 435B54882A3F65D2001011B8 /* address.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339C2650AB4900823167 /* address.c */; };
+ 435B54892A3F65D2001011B8 /* vsock.c in Sources */ = {isa = PBXBuildFile; fileRef = 4355474728F6E6310042E830 /* vsock.c */; };
+ 435B548A2A3F65D2001011B8 /* send.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B22650AB4B00823167 /* send.c */; };
+ 435B548B2A3F65D2001011B8 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C22650AB4D00823167 /* socket.c */; };
+ 435B548C2A3F65D2001011B8 /* pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DF82265EEC930024822F /* pipe.c */; };
+ 435B548D2A3F65D2001011B8 /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BC2650AB4C00823167 /* connect.c */; };
+ 435B548E2A3F65D2001011B8 /* capabilities.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B02650AB4B00823167 /* capabilities.c */; };
+ 435B548F2A3F65D2001011B8 /* socketoptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B52650AB4B00823167 /* socketoptions.c */; };
+ 435B54902A3F65D2001011B8 /* polling.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C12650AB4D00823167 /* polling.c */; };
+ 435B54912A3F65D2001011B8 /* receive.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AB2650AB4A00823167 /* receive.c */; };
+ 435B54922A3F65D2001011B8 /* jniutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A32650AB4900823167 /* jniutil.c */; };
+ 435B54932A3F65D2001011B8 /* init.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B32650AB4B00823167 /* init.c */; };
+ 435B54942A3F65D2001011B8 /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
+ 435B54952A3F65D2001011B8 /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A02650AB4900823167 /* config.c */; };
+ 435B54962A3F65D2001011B8 /* credentials.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C62650AB4E00823167 /* credentials.c */; };
+ 435B54972A3F65D2001011B8 /* socketpair.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DFB5266082000024822F /* socketpair.c */; };
+ 435B54982A3F65D2001011B8 /* exceptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BD2650AB4C00823167 /* exceptions.c */; };
+ 435B54992A3F65D2001011B8 /* reflection.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BA2650AB4C00823167 /* reflection.c */; };
+ 435B549A2A3F65D2001011B8 /* listen.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AF2650AB4B00823167 /* listen.c */; };
+ 435B549B2A3F65D2001011B8 /* ancillary.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A52650AB4900823167 /* ancillary.c */; };
+ 435B549C2A3F65D2001011B8 /* accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339E2650AB4900823167 /* accept.c */; };
+ 435B54A62A3F65F4001011B8 /* tipc.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E165F27FBB70B00A553EC /* tipc.h */; };
+ 435B54A72A3F65F4001011B8 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C02650AC3200823167 /* jni.h */; };
+ 435B54A82A3F65F4001011B8 /* ancillary.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C52650AB4E00823167 /* ancillary.h */; };
+ 435B54A92A3F65F4001011B8 /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
+ 435B54AA2A3F65F4001011B8 /* init.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BE2650AB4D00823167 /* init.h */; };
+ 435B54AB2A3F65F4001011B8 /* send.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AA2650AB4A00823167 /* send.h */; };
+ 435B54AC2A3F65F4001011B8 /* listen.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B12650AB4B00823167 /* listen.h */; };
+ 435B54AD2A3F65F4001011B8 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A22650AB4900823167 /* config.h */; };
+ 435B54AE2A3F65F4001011B8 /* socketpair.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DFB6266082000024822F /* socketpair.h */; };
+ 435B54AF2A3F65F4001011B8 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
+ 435B54B02A3F65F4001011B8 /* connect.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A72650AB4A00823167 /* connect.h */; };
+ 435B54B12A3F65F4001011B8 /* jniutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A12650AB4900823167 /* jniutil.h */; };
+ 435B54B22A3F65F4001011B8 /* socketoptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339D2650AB4900823167 /* socketoptions.h */; };
+ 435B54B32A3F65F4001011B8 /* filedescriptors.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AC2650AB4A00823167 /* filedescriptors.h */; };
+ 435B54B42A3F65F4001011B8 /* exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A82650AB4A00823167 /* exceptions.h */; };
+ 435B54B52A3F65F4001011B8 /* capabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A42650AB4900823167 /* capabilities.h */; };
+ 435B54B62A3F65F4001011B8 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C02650AB4D00823167 /* org_newsclub_net_unix_NativeUnixSocket.h */; };
+ 435B54B72A3F65F4001011B8 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B42650AB4B00823167 /* socket.h */; };
+ 435B54B82A3F65F4001011B8 /* ckmacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BF2650AB4D00823167 /* ckmacros.h */; };
+ 435B54B92A3F65F4001011B8 /* address.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B92650AB4C00823167 /* address.h */; };
+ 435B54BA2A3F65F4001011B8 /* polling.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A92650AB4A00823167 /* polling.h */; };
+ 435B54BB2A3F65F4001011B8 /* accept.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BB2650AB4C00823167 /* accept.h */; };
+ 435B54BC2A3F65F4001011B8 /* reflection.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AD2650AB4A00823167 /* reflection.h */; };
+ 435B54BD2A3F65F4001011B8 /* jniport.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C12650AC3200823167 /* jniport.h */; };
+ 435B54BE2A3F65F4001011B8 /* receive.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A62650AB4A00823167 /* receive.h */; };
+ 435B54BF2A3F65F4001011B8 /* credentials.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AE2650AB4A00823167 /* credentials.h */; };
+ 435B54C02A3F65F4001011B8 /* bind.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339F2650AB4900823167 /* bind.h */; };
+ 435B54C22A3F65F4001011B8 /* filedescriptors.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C42650AB4E00823167 /* filedescriptors.c */; };
+ 435B54C32A3F65F4001011B8 /* bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C32650AB4D00823167 /* bind.c */; };
+ 435B54C42A3F65F4001011B8 /* address.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339C2650AB4900823167 /* address.c */; };
+ 435B54C52A3F65F4001011B8 /* vsock.c in Sources */ = {isa = PBXBuildFile; fileRef = 4355474728F6E6310042E830 /* vsock.c */; };
+ 435B54C62A3F65F4001011B8 /* send.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B22650AB4B00823167 /* send.c */; };
+ 435B54C72A3F65F4001011B8 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C22650AB4D00823167 /* socket.c */; };
+ 435B54C82A3F65F4001011B8 /* pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DF82265EEC930024822F /* pipe.c */; };
+ 435B54C92A3F65F4001011B8 /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BC2650AB4C00823167 /* connect.c */; };
+ 435B54CA2A3F65F4001011B8 /* capabilities.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B02650AB4B00823167 /* capabilities.c */; };
+ 435B54CB2A3F65F4001011B8 /* socketoptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B52650AB4B00823167 /* socketoptions.c */; };
+ 435B54CC2A3F65F4001011B8 /* polling.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C12650AB4D00823167 /* polling.c */; };
+ 435B54CD2A3F65F4001011B8 /* receive.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AB2650AB4A00823167 /* receive.c */; };
+ 435B54CE2A3F65F4001011B8 /* jniutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A32650AB4900823167 /* jniutil.c */; };
+ 435B54CF2A3F65F4001011B8 /* init.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B32650AB4B00823167 /* init.c */; };
+ 435B54D02A3F65F4001011B8 /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
+ 435B54D12A3F65F4001011B8 /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A02650AB4900823167 /* config.c */; };
+ 435B54D22A3F65F4001011B8 /* credentials.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C62650AB4E00823167 /* credentials.c */; };
+ 435B54D32A3F65F4001011B8 /* socketpair.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DFB5266082000024822F /* socketpair.c */; };
+ 435B54D42A3F65F4001011B8 /* exceptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BD2650AB4C00823167 /* exceptions.c */; };
+ 435B54D52A3F65F4001011B8 /* reflection.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BA2650AB4C00823167 /* reflection.c */; };
+ 435B54D62A3F65F4001011B8 /* listen.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AF2650AB4B00823167 /* listen.c */; };
+ 435B54D72A3F65F4001011B8 /* ancillary.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A52650AB4900823167 /* ancillary.c */; };
+ 435B54D82A3F65F4001011B8 /* accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339E2650AB4900823167 /* accept.c */; };
+ 435B54E22A3F661F001011B8 /* tipc.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E165F27FBB70B00A553EC /* tipc.h */; };
+ 435B54E32A3F661F001011B8 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C02650AC3200823167 /* jni.h */; };
+ 435B54E42A3F661F001011B8 /* ancillary.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C52650AB4E00823167 /* ancillary.h */; };
+ 435B54E52A3F661F001011B8 /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
+ 435B54E62A3F661F001011B8 /* init.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BE2650AB4D00823167 /* init.h */; };
+ 435B54E72A3F661F001011B8 /* send.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AA2650AB4A00823167 /* send.h */; };
+ 435B54E82A3F661F001011B8 /* listen.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B12650AB4B00823167 /* listen.h */; };
+ 435B54E92A3F661F001011B8 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A22650AB4900823167 /* config.h */; };
+ 435B54EA2A3F661F001011B8 /* socketpair.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DFB6266082000024822F /* socketpair.h */; };
+ 435B54EB2A3F661F001011B8 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
+ 435B54EC2A3F661F001011B8 /* connect.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A72650AB4A00823167 /* connect.h */; };
+ 435B54ED2A3F661F001011B8 /* jniutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A12650AB4900823167 /* jniutil.h */; };
+ 435B54EE2A3F661F001011B8 /* socketoptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339D2650AB4900823167 /* socketoptions.h */; };
+ 435B54EF2A3F661F001011B8 /* filedescriptors.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AC2650AB4A00823167 /* filedescriptors.h */; };
+ 435B54F02A3F661F001011B8 /* exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A82650AB4A00823167 /* exceptions.h */; };
+ 435B54F12A3F661F001011B8 /* capabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A42650AB4900823167 /* capabilities.h */; };
+ 435B54F22A3F661F001011B8 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C02650AB4D00823167 /* org_newsclub_net_unix_NativeUnixSocket.h */; };
+ 435B54F32A3F661F001011B8 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B42650AB4B00823167 /* socket.h */; };
+ 435B54F42A3F661F001011B8 /* ckmacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BF2650AB4D00823167 /* ckmacros.h */; };
+ 435B54F52A3F661F001011B8 /* address.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B92650AB4C00823167 /* address.h */; };
+ 435B54F62A3F661F001011B8 /* polling.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A92650AB4A00823167 /* polling.h */; };
+ 435B54F72A3F661F001011B8 /* accept.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BB2650AB4C00823167 /* accept.h */; };
+ 435B54F82A3F661F001011B8 /* reflection.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AD2650AB4A00823167 /* reflection.h */; };
+ 435B54F92A3F661F001011B8 /* jniport.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C12650AC3200823167 /* jniport.h */; };
+ 435B54FA2A3F661F001011B8 /* receive.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A62650AB4A00823167 /* receive.h */; };
+ 435B54FB2A3F661F001011B8 /* credentials.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AE2650AB4A00823167 /* credentials.h */; };
+ 435B54FC2A3F661F001011B8 /* bind.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339F2650AB4900823167 /* bind.h */; };
+ 435B54FE2A3F661F001011B8 /* filedescriptors.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C42650AB4E00823167 /* filedescriptors.c */; };
+ 435B54FF2A3F661F001011B8 /* bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C32650AB4D00823167 /* bind.c */; };
+ 435B55002A3F661F001011B8 /* address.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339C2650AB4900823167 /* address.c */; };
+ 435B55012A3F661F001011B8 /* vsock.c in Sources */ = {isa = PBXBuildFile; fileRef = 4355474728F6E6310042E830 /* vsock.c */; };
+ 435B55022A3F661F001011B8 /* send.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B22650AB4B00823167 /* send.c */; };
+ 435B55032A3F661F001011B8 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C22650AB4D00823167 /* socket.c */; };
+ 435B55042A3F661F001011B8 /* pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DF82265EEC930024822F /* pipe.c */; };
+ 435B55052A3F661F001011B8 /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BC2650AB4C00823167 /* connect.c */; };
+ 435B55062A3F661F001011B8 /* capabilities.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B02650AB4B00823167 /* capabilities.c */; };
+ 435B55072A3F661F001011B8 /* socketoptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B52650AB4B00823167 /* socketoptions.c */; };
+ 435B55082A3F661F001011B8 /* polling.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C12650AB4D00823167 /* polling.c */; };
+ 435B55092A3F661F001011B8 /* receive.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AB2650AB4A00823167 /* receive.c */; };
+ 435B550A2A3F661F001011B8 /* jniutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A32650AB4900823167 /* jniutil.c */; };
+ 435B550B2A3F661F001011B8 /* init.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B32650AB4B00823167 /* init.c */; };
+ 435B550C2A3F661F001011B8 /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
+ 435B550D2A3F661F001011B8 /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A02650AB4900823167 /* config.c */; };
+ 435B550E2A3F661F001011B8 /* credentials.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C62650AB4E00823167 /* credentials.c */; };
+ 435B550F2A3F661F001011B8 /* socketpair.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DFB5266082000024822F /* socketpair.c */; };
+ 435B55102A3F661F001011B8 /* exceptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BD2650AB4C00823167 /* exceptions.c */; };
+ 435B55112A3F661F001011B8 /* reflection.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BA2650AB4C00823167 /* reflection.c */; };
+ 435B55122A3F661F001011B8 /* listen.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AF2650AB4B00823167 /* listen.c */; };
+ 435B55132A3F661F001011B8 /* ancillary.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A52650AB4900823167 /* ancillary.c */; };
+ 435B55142A3F661F001011B8 /* accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339E2650AB4900823167 /* accept.c */; };
43684D82282EE24B005F2989 /* tipc.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E165F27FBB70B00A553EC /* tipc.h */; };
43684D83282EE24B005F2989 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C02650AC3200823167 /* jni.h */; };
43684D84282EE24B005F2989 /* ancillary.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C52650AB4E00823167 /* ancillary.h */; };
@@ -808,6 +962,54 @@
436E168027FBB70B00A553EC /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
436E168127FBB70B00A553EC /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
436E168227FBB70B00A553EC /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
+ 438F4D972A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D982A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D992A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D9A2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D9B2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D9C2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D9D2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D9E2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4D9F2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA02A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA12A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA22A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA32A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA42A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA52A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA62A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA72A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA82A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DA92A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DAA2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DAB2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DAC2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DAD2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DAE2A6AF05000546E2C /* afsystem.c in Sources */ = {isa = PBXBuildFile; fileRef = 438F4D952A6AF05000546E2C /* afsystem.c */; };
+ 438F4DAF2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB02A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB12A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB22A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB32A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB42A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB52A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB62A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB72A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB82A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DB92A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DBA2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DBB2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DBC2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DBD2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DBE2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DBF2A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC02A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC12A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC22A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC32A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC42A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC52A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
+ 438F4DC62A6AF05100546E2C /* afsystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 438F4D962A6AF05000546E2C /* afsystem.h */; };
43B3DF83265EEC930024822F /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
43B3DF84265EEC930024822F /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
43B3DF85265EEC930024822F /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
@@ -1040,6 +1242,56 @@
43B3E0A5266971630024822F /* listen.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AF2650AB4B00823167 /* listen.c */; };
43B3E0A6266971630024822F /* ancillary.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A52650AB4900823167 /* ancillary.c */; };
43B3E0A7266971630024822F /* accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339E2650AB4900823167 /* accept.c */; };
+ 43C57CC72A38F370001DEA62 /* tipc.h in Headers */ = {isa = PBXBuildFile; fileRef = 436E165F27FBB70B00A553EC /* tipc.h */; };
+ 43C57CC82A38F370001DEA62 /* jni.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C02650AC3200823167 /* jni.h */; };
+ 43C57CC92A38F370001DEA62 /* ancillary.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C52650AB4E00823167 /* ancillary.h */; };
+ 43C57CCA2A38F370001DEA62 /* pipe.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DF81265EEC930024822F /* pipe.h */; };
+ 43C57CCB2A38F370001DEA62 /* init.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BE2650AB4D00823167 /* init.h */; };
+ 43C57CCC2A38F370001DEA62 /* send.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AA2650AB4A00823167 /* send.h */; };
+ 43C57CCD2A38F370001DEA62 /* listen.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B12650AB4B00823167 /* listen.h */; };
+ 43C57CCE2A38F370001DEA62 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A22650AB4900823167 /* config.h */; };
+ 43C57CCF2A38F370001DEA62 /* socketpair.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B3DFB6266082000024822F /* socketpair.h */; };
+ 43C57CD02A38F370001DEA62 /* vsock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4355474828F6E6310042E830 /* vsock.h */; };
+ 43C57CD12A38F370001DEA62 /* connect.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A72650AB4A00823167 /* connect.h */; };
+ 43C57CD22A38F370001DEA62 /* jniutil.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A12650AB4900823167 /* jniutil.h */; };
+ 43C57CD32A38F370001DEA62 /* socketoptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339D2650AB4900823167 /* socketoptions.h */; };
+ 43C57CD42A38F370001DEA62 /* filedescriptors.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AC2650AB4A00823167 /* filedescriptors.h */; };
+ 43C57CD52A38F370001DEA62 /* exceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A82650AB4A00823167 /* exceptions.h */; };
+ 43C57CD62A38F370001DEA62 /* capabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A42650AB4900823167 /* capabilities.h */; };
+ 43C57CD72A38F370001DEA62 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233C02650AB4D00823167 /* org_newsclub_net_unix_NativeUnixSocket.h */; };
+ 43C57CD82A38F370001DEA62 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B42650AB4B00823167 /* socket.h */; };
+ 43C57CD92A38F370001DEA62 /* ckmacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BF2650AB4D00823167 /* ckmacros.h */; };
+ 43C57CDA2A38F370001DEA62 /* address.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233B92650AB4C00823167 /* address.h */; };
+ 43C57CDB2A38F370001DEA62 /* polling.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A92650AB4A00823167 /* polling.h */; };
+ 43C57CDC2A38F370001DEA62 /* accept.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233BB2650AB4C00823167 /* accept.h */; };
+ 43C57CDD2A38F370001DEA62 /* reflection.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AD2650AB4A00823167 /* reflection.h */; };
+ 43C57CDE2A38F370001DEA62 /* jniport.h in Headers */ = {isa = PBXBuildFile; fileRef = 430235C12650AC3200823167 /* jniport.h */; };
+ 43C57CDF2A38F370001DEA62 /* receive.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233A62650AB4A00823167 /* receive.h */; };
+ 43C57CE02A38F370001DEA62 /* credentials.h in Headers */ = {isa = PBXBuildFile; fileRef = 430233AE2650AB4A00823167 /* credentials.h */; };
+ 43C57CE12A38F370001DEA62 /* bind.h in Headers */ = {isa = PBXBuildFile; fileRef = 4302339F2650AB4900823167 /* bind.h */; };
+ 43C57CE32A38F370001DEA62 /* filedescriptors.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C42650AB4E00823167 /* filedescriptors.c */; };
+ 43C57CE42A38F370001DEA62 /* bind.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C32650AB4D00823167 /* bind.c */; };
+ 43C57CE52A38F370001DEA62 /* address.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339C2650AB4900823167 /* address.c */; };
+ 43C57CE62A38F370001DEA62 /* vsock.c in Sources */ = {isa = PBXBuildFile; fileRef = 4355474728F6E6310042E830 /* vsock.c */; };
+ 43C57CE72A38F370001DEA62 /* send.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B22650AB4B00823167 /* send.c */; };
+ 43C57CE82A38F370001DEA62 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C22650AB4D00823167 /* socket.c */; };
+ 43C57CE92A38F370001DEA62 /* pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DF82265EEC930024822F /* pipe.c */; };
+ 43C57CEA2A38F370001DEA62 /* connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BC2650AB4C00823167 /* connect.c */; };
+ 43C57CEB2A38F370001DEA62 /* capabilities.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B02650AB4B00823167 /* capabilities.c */; };
+ 43C57CEC2A38F370001DEA62 /* socketoptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B52650AB4B00823167 /* socketoptions.c */; };
+ 43C57CED2A38F370001DEA62 /* polling.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C12650AB4D00823167 /* polling.c */; };
+ 43C57CEE2A38F370001DEA62 /* receive.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AB2650AB4A00823167 /* receive.c */; };
+ 43C57CEF2A38F370001DEA62 /* jniutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A32650AB4900823167 /* jniutil.c */; };
+ 43C57CF02A38F370001DEA62 /* init.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233B32650AB4B00823167 /* init.c */; };
+ 43C57CF12A38F370001DEA62 /* tipc.c in Sources */ = {isa = PBXBuildFile; fileRef = 436E166027FBB70B00A553EC /* tipc.c */; };
+ 43C57CF22A38F370001DEA62 /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A02650AB4900823167 /* config.c */; };
+ 43C57CF32A38F370001DEA62 /* credentials.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233C62650AB4E00823167 /* credentials.c */; };
+ 43C57CF42A38F370001DEA62 /* socketpair.c in Sources */ = {isa = PBXBuildFile; fileRef = 43B3DFB5266082000024822F /* socketpair.c */; };
+ 43C57CF52A38F370001DEA62 /* exceptions.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BD2650AB4C00823167 /* exceptions.c */; };
+ 43C57CF62A38F370001DEA62 /* reflection.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233BA2650AB4C00823167 /* reflection.c */; };
+ 43C57CF72A38F370001DEA62 /* listen.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233AF2650AB4B00823167 /* listen.c */; };
+ 43C57CF82A38F370001DEA62 /* ancillary.c in Sources */ = {isa = PBXBuildFile; fileRef = 430233A52650AB4900823167 /* ancillary.c */; };
+ 43C57CF92A38F370001DEA62 /* accept.c in Sources */ = {isa = PBXBuildFile; fileRef = 4302339E2650AB4900823167 /* accept.c */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -1127,6 +1379,27 @@
remoteGlobalIDString = 432EF1F7261ADEDD00F4A583;
remoteInfo = "armv6--linux-gnueabihf";
};
+ 435B54A22A3F65ED001011B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 43D436B0261A55D0002D0C12 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 435B54682A3F65D2001011B8;
+ remoteInfo = "x86_64-linux-android30";
+ };
+ 435B54DE2A3F6617001011B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 43D436B0261A55D0002D0C12 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 435B54A42A3F65F4001011B8;
+ remoteInfo = "i686-linux-android30";
+ };
+ 435B551A2A3F6658001011B8 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 43D436B0261A55D0002D0C12 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 435B54E02A3F661F001011B8;
+ remoteInfo = "arm-linux-androideabi30";
+ };
43684DB8282EE2CA005F2989 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43D436B0261A55D0002D0C12 /* Project object */;
@@ -1183,6 +1456,13 @@
remoteGlobalIDString = 432EF206261AE29200F4A583;
remoteInfo = "x86_64-apple-darwin18.2.0";
};
+ 43EE6B462A3B3D0700E6F8F2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 43D436B0261A55D0002D0C12 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 43C57CC52A38F370001DEA62;
+ remoteInfo = "aarch64-linux-android30";
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
@@ -1240,12 +1520,17 @@
432EF212261AE29200F4A583 /* libjunixsocket-x86_64-apple-darwin18.2.0.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-x86_64-apple-darwin18.2.0.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
4355474728F6E6310042E830 /* vsock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vsock.c; path = src/main/c/vsock.c; sourceTree = ""; };
4355474828F6E6310042E830 /* vsock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vsock.h; path = src/main/c/vsock.h; sourceTree = ""; };
+ 435B54A12A3F65D2001011B8 /* libjunixsocket-x86_64-linux-android30.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-x86_64-linux-android30.so"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 435B54DD2A3F65F4001011B8 /* libjunixsocket-i686-linux-android30.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-i686-linux-android30.so"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 435B55192A3F661F001011B8 /* libjunixsocket-arm-linux-androideabi30.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-arm-linux-androideabi30.so"; sourceTree = BUILT_PRODUCTS_DIR; };
43663EE2261AECC400CEED08 /* libjunixsocket-current.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-current.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
43684DB7282EE24B005F2989 /* libjunixsocket-aarch64-w64-mingw32.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-aarch64-w64-mingw32.so"; sourceTree = BUILT_PRODUCTS_DIR; };
436B5AB728244CB500574CD4 /* libjunixsocket-powerpc-ibm-aix7.2.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-powerpc-ibm-aix7.2.so"; sourceTree = BUILT_PRODUCTS_DIR; };
436B5AF12826F49A00574CD4 /* libjunixsocket-powerpc-ibm-os400.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-powerpc-ibm-os400.so"; sourceTree = BUILT_PRODUCTS_DIR; };
436E165F27FBB70B00A553EC /* tipc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = tipc.h; path = src/main/c/tipc.h; sourceTree = ""; };
436E166027FBB70B00A553EC /* tipc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tipc.c; path = src/main/c/tipc.c; sourceTree = ""; };
+ 438F4D952A6AF05000546E2C /* afsystem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = afsystem.c; path = src/main/c/afsystem.c; sourceTree = ""; };
+ 438F4D962A6AF05000546E2C /* afsystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = afsystem.h; path = src/main/c/afsystem.h; sourceTree = ""; };
43B3DF81265EEC930024822F /* pipe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = pipe.h; path = src/main/c/pipe.h; sourceTree = ""; };
43B3DF82265EEC930024822F /* pipe.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = pipe.c; path = src/main/c/pipe.c; sourceTree = ""; };
43B3DFB5266082000024822F /* socketpair.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = socketpair.c; path = src/main/c/socketpair.c; sourceTree = ""; };
@@ -1254,6 +1539,7 @@
43B3E03C26672FD30024822F /* libjunixsocket-x86_64-unknown-linux-gnu.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-x86_64-unknown-linux-gnu.so"; sourceTree = BUILT_PRODUCTS_DIR; };
43B3E074266756540024822F /* libjunixsocket-amd64-unknown-openbsd6.9.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-amd64-unknown-openbsd6.9.so"; sourceTree = BUILT_PRODUCTS_DIR; };
43B3E0AC266971630024822F /* libjunixsocket-sparc-sun-solaris2.11.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-sparc-sun-solaris2.11.so"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 43C57CFE2A38F370001DEA62 /* libjunixsocket-aarch64-linux-android30.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-aarch64-linux-android30.so"; sourceTree = BUILT_PRODUCTS_DIR; };
43C5FB7D261AC3700088E301 /* libjunixsocket-arm64-apple-macos11.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-arm64-apple-macos11.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
43D436BC261A564C002D0C12 /* libjunixsocket-x86_64-alpine-linux-musl.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjunixsocket-x86_64-alpine-linux-musl.so"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
@@ -1329,6 +1615,27 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 435B549D2A3F65D2001011B8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B54D92A3F65F4001011B8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B55152A3F661F001011B8 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
43663EDE261AECC400CEED08 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -1385,6 +1692,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 43C57CFA2A38F370001DEA62 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
43C5FB79261AC3700088E301 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -1430,6 +1744,8 @@
430233BB2650AB4C00823167 /* accept.h */,
4302339C2650AB4900823167 /* address.c */,
430233B92650AB4C00823167 /* address.h */,
+ 438F4D952A6AF05000546E2C /* afsystem.c */,
+ 438F4D962A6AF05000546E2C /* afsystem.h */,
430233A52650AB4900823167 /* ancillary.c */,
430233C52650AB4E00823167 /* ancillary.h */,
430233C32650AB4D00823167 /* bind.c */,
@@ -1515,6 +1831,10 @@
436B5AB728244CB500574CD4 /* libjunixsocket-powerpc-ibm-aix7.2.so */,
436B5AF12826F49A00574CD4 /* libjunixsocket-powerpc-ibm-os400.so */,
43684DB7282EE24B005F2989 /* libjunixsocket-aarch64-w64-mingw32.so */,
+ 43C57CFE2A38F370001DEA62 /* libjunixsocket-aarch64-linux-android30.so */,
+ 435B54A12A3F65D2001011B8 /* libjunixsocket-x86_64-linux-android30.so */,
+ 435B54DD2A3F65F4001011B8 /* libjunixsocket-i686-linux-android30.so */,
+ 435B55192A3F661F001011B8 /* libjunixsocket-arm-linux-androideabi30.so */,
);
name = Products;
sourceTree = "";
@@ -1546,6 +1866,7 @@
4304A602266DFCEF003BCEDF /* socket.h in Headers */,
4304A603266DFCEF003BCEDF /* ckmacros.h in Headers */,
4304A604266DFCEF003BCEDF /* address.h in Headers */,
+ 438F4DC22A6AF05100546E2C /* afsystem.h in Headers */,
4304A605266DFCEF003BCEDF /* polling.h in Headers */,
4304A606266DFCEF003BCEDF /* accept.h in Headers */,
4304A607266DFCEF003BCEDF /* reflection.h in Headers */,
@@ -1580,6 +1901,7 @@
430234E82650AB4F00823167 /* socket.h in Headers */,
430235602650AB4F00823167 /* ckmacros.h in Headers */,
430235182650AB4F00823167 /* address.h in Headers */,
+ 438F4DB02A6AF05100546E2C /* afsystem.h in Headers */,
430234642650AB4E00823167 /* polling.h in Headers */,
430235302650AB4F00823167 /* accept.h in Headers */,
430234942650AB4E00823167 /* reflection.h in Headers */,
@@ -1614,6 +1936,7 @@
430234F22650AB4F00823167 /* socket.h in Headers */,
4302356A2650AB4F00823167 /* ckmacros.h in Headers */,
430235222650AB4F00823167 /* address.h in Headers */,
+ 438F4DBE2A6AF05100546E2C /* afsystem.h in Headers */,
4302346E2650AB4E00823167 /* polling.h in Headers */,
4302353A2650AB4F00823167 /* accept.h in Headers */,
4302349E2650AB4E00823167 /* reflection.h in Headers */,
@@ -1648,6 +1971,7 @@
430234EB2650AB4F00823167 /* socket.h in Headers */,
430235632650AB4F00823167 /* ckmacros.h in Headers */,
4302351B2650AB4F00823167 /* address.h in Headers */,
+ 438F4DB42A6AF05100546E2C /* afsystem.h in Headers */,
430234672650AB4E00823167 /* polling.h in Headers */,
430235332650AB4F00823167 /* accept.h in Headers */,
430234972650AB4E00823167 /* reflection.h in Headers */,
@@ -1682,6 +2006,7 @@
430234EE2650AB4F00823167 /* socket.h in Headers */,
430235662650AB4F00823167 /* ckmacros.h in Headers */,
4302351E2650AB4F00823167 /* address.h in Headers */,
+ 438F4DB92A6AF05100546E2C /* afsystem.h in Headers */,
4302346A2650AB4E00823167 /* polling.h in Headers */,
430235362650AB4F00823167 /* accept.h in Headers */,
4302349A2650AB4E00823167 /* reflection.h in Headers */,
@@ -1716,6 +2041,7 @@
430234F12650AB4F00823167 /* socket.h in Headers */,
430235692650AB4F00823167 /* ckmacros.h in Headers */,
430235212650AB4F00823167 /* address.h in Headers */,
+ 438F4DBC2A6AF05100546E2C /* afsystem.h in Headers */,
4302346D2650AB4E00823167 /* polling.h in Headers */,
430235392650AB4F00823167 /* accept.h in Headers */,
4302349D2650AB4E00823167 /* reflection.h in Headers */,
@@ -1750,6 +2076,7 @@
430234EC2650AB4F00823167 /* socket.h in Headers */,
430235642650AB4F00823167 /* ckmacros.h in Headers */,
4302351C2650AB4F00823167 /* address.h in Headers */,
+ 438F4DB52A6AF05100546E2C /* afsystem.h in Headers */,
430234682650AB4E00823167 /* polling.h in Headers */,
430235342650AB4F00823167 /* accept.h in Headers */,
430234982650AB4E00823167 /* reflection.h in Headers */,
@@ -1784,6 +2111,7 @@
430234ED2650AB4F00823167 /* socket.h in Headers */,
430235652650AB4F00823167 /* ckmacros.h in Headers */,
4302351D2650AB4F00823167 /* address.h in Headers */,
+ 438F4DB82A6AF05100546E2C /* afsystem.h in Headers */,
430234692650AB4E00823167 /* polling.h in Headers */,
430235352650AB4F00823167 /* accept.h in Headers */,
430234992650AB4E00823167 /* reflection.h in Headers */,
@@ -1818,6 +2146,7 @@
430234EA2650AB4F00823167 /* socket.h in Headers */,
430235622650AB4F00823167 /* ckmacros.h in Headers */,
4302351A2650AB4F00823167 /* address.h in Headers */,
+ 438F4DB32A6AF05100546E2C /* afsystem.h in Headers */,
430234662650AB4E00823167 /* polling.h in Headers */,
430235322650AB4F00823167 /* accept.h in Headers */,
430234962650AB4E00823167 /* reflection.h in Headers */,
@@ -1852,6 +2181,7 @@
430234F02650AB4F00823167 /* socket.h in Headers */,
430235682650AB4F00823167 /* ckmacros.h in Headers */,
430235202650AB4F00823167 /* address.h in Headers */,
+ 438F4DBB2A6AF05100546E2C /* afsystem.h in Headers */,
4302346C2650AB4E00823167 /* polling.h in Headers */,
430235382650AB4F00823167 /* accept.h in Headers */,
4302349C2650AB4E00823167 /* reflection.h in Headers */,
@@ -1862,6 +2192,111 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 435B54692A3F65D2001011B8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 435B546A2A3F65D2001011B8 /* tipc.h in Headers */,
+ 435B546B2A3F65D2001011B8 /* jni.h in Headers */,
+ 435B546C2A3F65D2001011B8 /* ancillary.h in Headers */,
+ 435B546D2A3F65D2001011B8 /* pipe.h in Headers */,
+ 435B546E2A3F65D2001011B8 /* init.h in Headers */,
+ 435B546F2A3F65D2001011B8 /* send.h in Headers */,
+ 435B54702A3F65D2001011B8 /* listen.h in Headers */,
+ 435B54712A3F65D2001011B8 /* config.h in Headers */,
+ 435B54722A3F65D2001011B8 /* socketpair.h in Headers */,
+ 435B54732A3F65D2001011B8 /* vsock.h in Headers */,
+ 435B54742A3F65D2001011B8 /* connect.h in Headers */,
+ 435B54752A3F65D2001011B8 /* jniutil.h in Headers */,
+ 435B54762A3F65D2001011B8 /* socketoptions.h in Headers */,
+ 435B54772A3F65D2001011B8 /* filedescriptors.h in Headers */,
+ 435B54782A3F65D2001011B8 /* exceptions.h in Headers */,
+ 435B54792A3F65D2001011B8 /* capabilities.h in Headers */,
+ 435B547A2A3F65D2001011B8 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */,
+ 435B547B2A3F65D2001011B8 /* socket.h in Headers */,
+ 435B547C2A3F65D2001011B8 /* ckmacros.h in Headers */,
+ 435B547D2A3F65D2001011B8 /* address.h in Headers */,
+ 438F4DC42A6AF05100546E2C /* afsystem.h in Headers */,
+ 435B547E2A3F65D2001011B8 /* polling.h in Headers */,
+ 435B547F2A3F65D2001011B8 /* accept.h in Headers */,
+ 435B54802A3F65D2001011B8 /* reflection.h in Headers */,
+ 435B54812A3F65D2001011B8 /* jniport.h in Headers */,
+ 435B54822A3F65D2001011B8 /* receive.h in Headers */,
+ 435B54832A3F65D2001011B8 /* credentials.h in Headers */,
+ 435B54842A3F65D2001011B8 /* bind.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B54A52A3F65F4001011B8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 435B54A62A3F65F4001011B8 /* tipc.h in Headers */,
+ 435B54A72A3F65F4001011B8 /* jni.h in Headers */,
+ 435B54A82A3F65F4001011B8 /* ancillary.h in Headers */,
+ 435B54A92A3F65F4001011B8 /* pipe.h in Headers */,
+ 435B54AA2A3F65F4001011B8 /* init.h in Headers */,
+ 435B54AB2A3F65F4001011B8 /* send.h in Headers */,
+ 435B54AC2A3F65F4001011B8 /* listen.h in Headers */,
+ 435B54AD2A3F65F4001011B8 /* config.h in Headers */,
+ 435B54AE2A3F65F4001011B8 /* socketpair.h in Headers */,
+ 435B54AF2A3F65F4001011B8 /* vsock.h in Headers */,
+ 435B54B02A3F65F4001011B8 /* connect.h in Headers */,
+ 435B54B12A3F65F4001011B8 /* jniutil.h in Headers */,
+ 435B54B22A3F65F4001011B8 /* socketoptions.h in Headers */,
+ 435B54B32A3F65F4001011B8 /* filedescriptors.h in Headers */,
+ 435B54B42A3F65F4001011B8 /* exceptions.h in Headers */,
+ 435B54B52A3F65F4001011B8 /* capabilities.h in Headers */,
+ 435B54B62A3F65F4001011B8 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */,
+ 435B54B72A3F65F4001011B8 /* socket.h in Headers */,
+ 435B54B82A3F65F4001011B8 /* ckmacros.h in Headers */,
+ 435B54B92A3F65F4001011B8 /* address.h in Headers */,
+ 438F4DC52A6AF05100546E2C /* afsystem.h in Headers */,
+ 435B54BA2A3F65F4001011B8 /* polling.h in Headers */,
+ 435B54BB2A3F65F4001011B8 /* accept.h in Headers */,
+ 435B54BC2A3F65F4001011B8 /* reflection.h in Headers */,
+ 435B54BD2A3F65F4001011B8 /* jniport.h in Headers */,
+ 435B54BE2A3F65F4001011B8 /* receive.h in Headers */,
+ 435B54BF2A3F65F4001011B8 /* credentials.h in Headers */,
+ 435B54C02A3F65F4001011B8 /* bind.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B54E12A3F661F001011B8 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 435B54E22A3F661F001011B8 /* tipc.h in Headers */,
+ 435B54E32A3F661F001011B8 /* jni.h in Headers */,
+ 435B54E42A3F661F001011B8 /* ancillary.h in Headers */,
+ 435B54E52A3F661F001011B8 /* pipe.h in Headers */,
+ 435B54E62A3F661F001011B8 /* init.h in Headers */,
+ 435B54E72A3F661F001011B8 /* send.h in Headers */,
+ 435B54E82A3F661F001011B8 /* listen.h in Headers */,
+ 435B54E92A3F661F001011B8 /* config.h in Headers */,
+ 435B54EA2A3F661F001011B8 /* socketpair.h in Headers */,
+ 435B54EB2A3F661F001011B8 /* vsock.h in Headers */,
+ 435B54EC2A3F661F001011B8 /* connect.h in Headers */,
+ 435B54ED2A3F661F001011B8 /* jniutil.h in Headers */,
+ 435B54EE2A3F661F001011B8 /* socketoptions.h in Headers */,
+ 435B54EF2A3F661F001011B8 /* filedescriptors.h in Headers */,
+ 435B54F02A3F661F001011B8 /* exceptions.h in Headers */,
+ 435B54F12A3F661F001011B8 /* capabilities.h in Headers */,
+ 435B54F22A3F661F001011B8 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */,
+ 435B54F32A3F661F001011B8 /* socket.h in Headers */,
+ 435B54F42A3F661F001011B8 /* ckmacros.h in Headers */,
+ 435B54F52A3F661F001011B8 /* address.h in Headers */,
+ 438F4DC62A6AF05100546E2C /* afsystem.h in Headers */,
+ 435B54F62A3F661F001011B8 /* polling.h in Headers */,
+ 435B54F72A3F661F001011B8 /* accept.h in Headers */,
+ 435B54F82A3F661F001011B8 /* reflection.h in Headers */,
+ 435B54F92A3F661F001011B8 /* jniport.h in Headers */,
+ 435B54FA2A3F661F001011B8 /* receive.h in Headers */,
+ 435B54FB2A3F661F001011B8 /* credentials.h in Headers */,
+ 435B54FC2A3F661F001011B8 /* bind.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
43663ED7261AECC400CEED08 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -1886,6 +2321,7 @@
430234E72650AB4F00823167 /* socket.h in Headers */,
4302355F2650AB4F00823167 /* ckmacros.h in Headers */,
430235172650AB4F00823167 /* address.h in Headers */,
+ 438F4DAF2A6AF05100546E2C /* afsystem.h in Headers */,
430234632650AB4E00823167 /* polling.h in Headers */,
4302352F2650AB4F00823167 /* accept.h in Headers */,
430234932650AB4E00823167 /* reflection.h in Headers */,
@@ -1920,6 +2356,7 @@
43684D92282EE24B005F2989 /* socket.h in Headers */,
43684D93282EE24B005F2989 /* ckmacros.h in Headers */,
43684D94282EE24B005F2989 /* address.h in Headers */,
+ 438F4DBD2A6AF05100546E2C /* afsystem.h in Headers */,
43684D95282EE24B005F2989 /* polling.h in Headers */,
43684D96282EE24B005F2989 /* accept.h in Headers */,
43684D97282EE24B005F2989 /* reflection.h in Headers */,
@@ -1954,6 +2391,7 @@
436B5A9228244CB500574CD4 /* socket.h in Headers */,
436B5A9328244CB500574CD4 /* ckmacros.h in Headers */,
436B5A9428244CB500574CD4 /* address.h in Headers */,
+ 438F4DB62A6AF05100546E2C /* afsystem.h in Headers */,
436B5A9528244CB500574CD4 /* polling.h in Headers */,
436B5A9628244CB500574CD4 /* accept.h in Headers */,
436B5A9728244CB500574CD4 /* reflection.h in Headers */,
@@ -1988,6 +2426,7 @@
436B5ACC2826F49A00574CD4 /* socket.h in Headers */,
436B5ACD2826F49A00574CD4 /* ckmacros.h in Headers */,
436B5ACE2826F49A00574CD4 /* address.h in Headers */,
+ 438F4DB72A6AF05100546E2C /* afsystem.h in Headers */,
436B5ACF2826F49A00574CD4 /* polling.h in Headers */,
436B5AD02826F49A00574CD4 /* accept.h in Headers */,
436B5AD12826F49A00574CD4 /* reflection.h in Headers */,
@@ -2022,6 +2461,7 @@
43B3DFE026660A2D0024822F /* socket.h in Headers */,
43B3DFE126660A2D0024822F /* ckmacros.h in Headers */,
43B3DFE226660A2D0024822F /* address.h in Headers */,
+ 438F4DBF2A6AF05100546E2C /* afsystem.h in Headers */,
43B3DFE326660A2D0024822F /* polling.h in Headers */,
43B3DFE426660A2D0024822F /* accept.h in Headers */,
43B3DFE526660A2D0024822F /* reflection.h in Headers */,
@@ -2056,6 +2496,7 @@
43B3E01826672FD30024822F /* socket.h in Headers */,
43B3E01926672FD30024822F /* ckmacros.h in Headers */,
43B3E01A26672FD30024822F /* address.h in Headers */,
+ 438F4DC02A6AF05100546E2C /* afsystem.h in Headers */,
43B3E01B26672FD30024822F /* polling.h in Headers */,
43B3E01C26672FD30024822F /* accept.h in Headers */,
43B3E01D26672FD30024822F /* reflection.h in Headers */,
@@ -2090,6 +2531,7 @@
43B3E050266756540024822F /* socket.h in Headers */,
43B3E051266756540024822F /* ckmacros.h in Headers */,
43B3E052266756540024822F /* address.h in Headers */,
+ 438F4DB12A6AF05100546E2C /* afsystem.h in Headers */,
43B3E053266756540024822F /* polling.h in Headers */,
43B3E054266756540024822F /* accept.h in Headers */,
43B3E055266756540024822F /* reflection.h in Headers */,
@@ -2124,6 +2566,7 @@
43B3E088266971630024822F /* socket.h in Headers */,
43B3E089266971630024822F /* ckmacros.h in Headers */,
43B3E08A266971630024822F /* address.h in Headers */,
+ 438F4DC12A6AF05100546E2C /* afsystem.h in Headers */,
43B3E08B266971630024822F /* polling.h in Headers */,
43B3E08C266971630024822F /* accept.h in Headers */,
43B3E08D266971630024822F /* reflection.h in Headers */,
@@ -2134,6 +2577,41 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 43C57CC62A38F370001DEA62 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 43C57CC72A38F370001DEA62 /* tipc.h in Headers */,
+ 43C57CC82A38F370001DEA62 /* jni.h in Headers */,
+ 43C57CC92A38F370001DEA62 /* ancillary.h in Headers */,
+ 43C57CCA2A38F370001DEA62 /* pipe.h in Headers */,
+ 43C57CCB2A38F370001DEA62 /* init.h in Headers */,
+ 43C57CCC2A38F370001DEA62 /* send.h in Headers */,
+ 43C57CCD2A38F370001DEA62 /* listen.h in Headers */,
+ 43C57CCE2A38F370001DEA62 /* config.h in Headers */,
+ 43C57CCF2A38F370001DEA62 /* socketpair.h in Headers */,
+ 43C57CD02A38F370001DEA62 /* vsock.h in Headers */,
+ 43C57CD12A38F370001DEA62 /* connect.h in Headers */,
+ 43C57CD22A38F370001DEA62 /* jniutil.h in Headers */,
+ 43C57CD32A38F370001DEA62 /* socketoptions.h in Headers */,
+ 43C57CD42A38F370001DEA62 /* filedescriptors.h in Headers */,
+ 43C57CD52A38F370001DEA62 /* exceptions.h in Headers */,
+ 43C57CD62A38F370001DEA62 /* capabilities.h in Headers */,
+ 43C57CD72A38F370001DEA62 /* org_newsclub_net_unix_NativeUnixSocket.h in Headers */,
+ 43C57CD82A38F370001DEA62 /* socket.h in Headers */,
+ 43C57CD92A38F370001DEA62 /* ckmacros.h in Headers */,
+ 43C57CDA2A38F370001DEA62 /* address.h in Headers */,
+ 438F4DC32A6AF05100546E2C /* afsystem.h in Headers */,
+ 43C57CDB2A38F370001DEA62 /* polling.h in Headers */,
+ 43C57CDC2A38F370001DEA62 /* accept.h in Headers */,
+ 43C57CDD2A38F370001DEA62 /* reflection.h in Headers */,
+ 43C57CDE2A38F370001DEA62 /* jniport.h in Headers */,
+ 43C57CDF2A38F370001DEA62 /* receive.h in Headers */,
+ 43C57CE02A38F370001DEA62 /* credentials.h in Headers */,
+ 43C57CE12A38F370001DEA62 /* bind.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
43C5FB72261AC3700088E301 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
@@ -2158,6 +2636,7 @@
430234E92650AB4F00823167 /* socket.h in Headers */,
430235612650AB4F00823167 /* ckmacros.h in Headers */,
430235192650AB4F00823167 /* address.h in Headers */,
+ 438F4DB22A6AF05100546E2C /* afsystem.h in Headers */,
430234652650AB4E00823167 /* polling.h in Headers */,
430235312650AB4F00823167 /* accept.h in Headers */,
430234952650AB4E00823167 /* reflection.h in Headers */,
@@ -2192,6 +2671,7 @@
430234EF2650AB4F00823167 /* socket.h in Headers */,
430235672650AB4F00823167 /* ckmacros.h in Headers */,
4302351F2650AB4F00823167 /* address.h in Headers */,
+ 438F4DBA2A6AF05100546E2C /* afsystem.h in Headers */,
4302346B2650AB4E00823167 /* polling.h in Headers */,
430235372650AB4F00823167 /* accept.h in Headers */,
4302349B2650AB4E00823167 /* reflection.h in Headers */,
@@ -2375,6 +2855,57 @@
productReference = 432EF212261AE29200F4A583 /* libjunixsocket-x86_64-apple-darwin18.2.0.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
+ 435B54682A3F65D2001011B8 /* x86_64-linux-android30 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 435B549E2A3F65D2001011B8 /* Build configuration list for PBXNativeTarget "x86_64-linux-android30" */;
+ buildPhases = (
+ 435B54692A3F65D2001011B8 /* Headers */,
+ 435B54852A3F65D2001011B8 /* Sources */,
+ 435B549D2A3F65D2001011B8 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "x86_64-linux-android30";
+ productName = "junixsocket-native";
+ productReference = 435B54A12A3F65D2001011B8 /* libjunixsocket-x86_64-linux-android30.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 435B54A42A3F65F4001011B8 /* i686-linux-android30 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 435B54DA2A3F65F4001011B8 /* Build configuration list for PBXNativeTarget "i686-linux-android30" */;
+ buildPhases = (
+ 435B54A52A3F65F4001011B8 /* Headers */,
+ 435B54C12A3F65F4001011B8 /* Sources */,
+ 435B54D92A3F65F4001011B8 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "i686-linux-android30";
+ productName = "junixsocket-native";
+ productReference = 435B54DD2A3F65F4001011B8 /* libjunixsocket-i686-linux-android30.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
+ 435B54E02A3F661F001011B8 /* arm-linux-androideabi30 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 435B55162A3F661F001011B8 /* Build configuration list for PBXNativeTarget "arm-linux-androideabi30" */;
+ buildPhases = (
+ 435B54E12A3F661F001011B8 /* Headers */,
+ 435B54FD2A3F661F001011B8 /* Sources */,
+ 435B55152A3F661F001011B8 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "arm-linux-androideabi30";
+ productName = "junixsocket-native";
+ productReference = 435B55192A3F661F001011B8 /* libjunixsocket-arm-linux-androideabi30.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
43663ED6261AECC400CEED08 /* current */ = {
isa = PBXNativeTarget;
buildConfigurationList = 43663EDF261AECC400CEED08 /* Build configuration list for PBXNativeTarget "current" */;
@@ -2511,6 +3042,23 @@
productReference = 43B3E0AC266971630024822F /* libjunixsocket-sparc-sun-solaris2.11.so */;
productType = "com.apple.product-type.library.dynamic";
};
+ 43C57CC52A38F370001DEA62 /* aarch64-linux-android30 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 43C57CFB2A38F370001DEA62 /* Build configuration list for PBXNativeTarget "aarch64-linux-android30" */;
+ buildPhases = (
+ 43C57CC62A38F370001DEA62 /* Headers */,
+ 43C57CE22A38F370001DEA62 /* Sources */,
+ 43C57CFA2A38F370001DEA62 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "aarch64-linux-android30";
+ productName = "junixsocket-native";
+ productReference = 43C57CFE2A38F370001DEA62 /* libjunixsocket-aarch64-linux-android30.so */;
+ productType = "com.apple.product-type.library.dynamic";
+ };
43C5FB71261AC3700088E301 /* arm64-apple-macos11 */ = {
isa = PBXNativeTarget;
buildConfigurationList = 43C5FB7A261AC3700088E301 /* Build configuration list for PBXNativeTarget "arm64-apple-macos11" */;
@@ -2551,7 +3099,8 @@
43D436B0261A55D0002D0C12 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1320;
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1430;
TargetAttributes = {
432EF186261AD52100F4A583 = {
CreatedOnToolsVersion = 11.3.1;
@@ -2595,6 +3144,10 @@
43B3E00726672FD30024822F /* x86_64-unknown-linux-gnu */,
43B3E077266971630024822F /* sparc-sun-solaris2.11 */,
4304A5F1266DFCEF003BCEDF /* x86_64-portbld-dragonfly6.0 */,
+ 43C57CC52A38F370001DEA62 /* aarch64-linux-android30 */,
+ 435B54682A3F65D2001011B8 /* x86_64-linux-android30 */,
+ 435B54A42A3F65F4001011B8 /* i686-linux-android30 */,
+ 435B54E02A3F661F001011B8 /* arm-linux-androideabi30 */,
);
};
/* End PBXProject section */
@@ -2627,6 +3180,7 @@
4304A61F266DFCEF003BCEDF /* listen.c in Sources */,
4304A620266DFCEF003BCEDF /* ancillary.c in Sources */,
4304A621266DFCEF003BCEDF /* accept.c in Sources */,
+ 438F4DAA2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2657,6 +3211,7 @@
430234AC2650AB4E00823167 /* listen.c in Sources */,
430234342650AB4E00823167 /* ancillary.c in Sources */,
430233E02650AB4E00823167 /* accept.c in Sources */,
+ 438F4D982A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2687,6 +3242,7 @@
430234B62650AB4E00823167 /* listen.c in Sources */,
4302343E2650AB4E00823167 /* ancillary.c in Sources */,
430233EA2650AB4E00823167 /* accept.c in Sources */,
+ 438F4DA62A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2717,6 +3273,7 @@
430234AF2650AB4E00823167 /* listen.c in Sources */,
430234372650AB4E00823167 /* ancillary.c in Sources */,
430233E32650AB4E00823167 /* accept.c in Sources */,
+ 438F4D9C2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2747,6 +3304,7 @@
430234B22650AB4E00823167 /* listen.c in Sources */,
4302343A2650AB4E00823167 /* ancillary.c in Sources */,
430233E62650AB4E00823167 /* accept.c in Sources */,
+ 438F4DA12A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2777,6 +3335,7 @@
430234B52650AB4E00823167 /* listen.c in Sources */,
4302343D2650AB4E00823167 /* ancillary.c in Sources */,
430233E92650AB4E00823167 /* accept.c in Sources */,
+ 438F4DA42A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2807,6 +3366,7 @@
430234B02650AB4E00823167 /* listen.c in Sources */,
430234382650AB4E00823167 /* ancillary.c in Sources */,
430233E42650AB4E00823167 /* accept.c in Sources */,
+ 438F4D9D2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2837,6 +3397,7 @@
430234B12650AB4E00823167 /* listen.c in Sources */,
430234392650AB4E00823167 /* ancillary.c in Sources */,
430233E52650AB4E00823167 /* accept.c in Sources */,
+ 438F4DA02A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2867,6 +3428,7 @@
430234AE2650AB4E00823167 /* listen.c in Sources */,
430234362650AB4E00823167 /* ancillary.c in Sources */,
430233E22650AB4E00823167 /* accept.c in Sources */,
+ 438F4D9B2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2897,6 +3459,100 @@
430234B42650AB4E00823167 /* listen.c in Sources */,
4302343C2650AB4E00823167 /* ancillary.c in Sources */,
430233E82650AB4E00823167 /* accept.c in Sources */,
+ 438F4DA32A6AF05000546E2C /* afsystem.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B54852A3F65D2001011B8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 435B54862A3F65D2001011B8 /* filedescriptors.c in Sources */,
+ 435B54872A3F65D2001011B8 /* bind.c in Sources */,
+ 435B54882A3F65D2001011B8 /* address.c in Sources */,
+ 435B54892A3F65D2001011B8 /* vsock.c in Sources */,
+ 435B548A2A3F65D2001011B8 /* send.c in Sources */,
+ 435B548B2A3F65D2001011B8 /* socket.c in Sources */,
+ 435B548C2A3F65D2001011B8 /* pipe.c in Sources */,
+ 435B548D2A3F65D2001011B8 /* connect.c in Sources */,
+ 435B548E2A3F65D2001011B8 /* capabilities.c in Sources */,
+ 435B548F2A3F65D2001011B8 /* socketoptions.c in Sources */,
+ 435B54902A3F65D2001011B8 /* polling.c in Sources */,
+ 435B54912A3F65D2001011B8 /* receive.c in Sources */,
+ 435B54922A3F65D2001011B8 /* jniutil.c in Sources */,
+ 435B54932A3F65D2001011B8 /* init.c in Sources */,
+ 435B54942A3F65D2001011B8 /* tipc.c in Sources */,
+ 435B54952A3F65D2001011B8 /* config.c in Sources */,
+ 435B54962A3F65D2001011B8 /* credentials.c in Sources */,
+ 435B54972A3F65D2001011B8 /* socketpair.c in Sources */,
+ 435B54982A3F65D2001011B8 /* exceptions.c in Sources */,
+ 435B54992A3F65D2001011B8 /* reflection.c in Sources */,
+ 435B549A2A3F65D2001011B8 /* listen.c in Sources */,
+ 435B549B2A3F65D2001011B8 /* ancillary.c in Sources */,
+ 435B549C2A3F65D2001011B8 /* accept.c in Sources */,
+ 438F4DAC2A6AF05000546E2C /* afsystem.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B54C12A3F65F4001011B8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 435B54C22A3F65F4001011B8 /* filedescriptors.c in Sources */,
+ 435B54C32A3F65F4001011B8 /* bind.c in Sources */,
+ 435B54C42A3F65F4001011B8 /* address.c in Sources */,
+ 435B54C52A3F65F4001011B8 /* vsock.c in Sources */,
+ 435B54C62A3F65F4001011B8 /* send.c in Sources */,
+ 435B54C72A3F65F4001011B8 /* socket.c in Sources */,
+ 435B54C82A3F65F4001011B8 /* pipe.c in Sources */,
+ 435B54C92A3F65F4001011B8 /* connect.c in Sources */,
+ 435B54CA2A3F65F4001011B8 /* capabilities.c in Sources */,
+ 435B54CB2A3F65F4001011B8 /* socketoptions.c in Sources */,
+ 435B54CC2A3F65F4001011B8 /* polling.c in Sources */,
+ 435B54CD2A3F65F4001011B8 /* receive.c in Sources */,
+ 435B54CE2A3F65F4001011B8 /* jniutil.c in Sources */,
+ 435B54CF2A3F65F4001011B8 /* init.c in Sources */,
+ 435B54D02A3F65F4001011B8 /* tipc.c in Sources */,
+ 435B54D12A3F65F4001011B8 /* config.c in Sources */,
+ 435B54D22A3F65F4001011B8 /* credentials.c in Sources */,
+ 435B54D32A3F65F4001011B8 /* socketpair.c in Sources */,
+ 435B54D42A3F65F4001011B8 /* exceptions.c in Sources */,
+ 435B54D52A3F65F4001011B8 /* reflection.c in Sources */,
+ 435B54D62A3F65F4001011B8 /* listen.c in Sources */,
+ 435B54D72A3F65F4001011B8 /* ancillary.c in Sources */,
+ 435B54D82A3F65F4001011B8 /* accept.c in Sources */,
+ 438F4DAD2A6AF05000546E2C /* afsystem.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 435B54FD2A3F661F001011B8 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 435B54FE2A3F661F001011B8 /* filedescriptors.c in Sources */,
+ 435B54FF2A3F661F001011B8 /* bind.c in Sources */,
+ 435B55002A3F661F001011B8 /* address.c in Sources */,
+ 435B55012A3F661F001011B8 /* vsock.c in Sources */,
+ 435B55022A3F661F001011B8 /* send.c in Sources */,
+ 435B55032A3F661F001011B8 /* socket.c in Sources */,
+ 435B55042A3F661F001011B8 /* pipe.c in Sources */,
+ 435B55052A3F661F001011B8 /* connect.c in Sources */,
+ 435B55062A3F661F001011B8 /* capabilities.c in Sources */,
+ 435B55072A3F661F001011B8 /* socketoptions.c in Sources */,
+ 435B55082A3F661F001011B8 /* polling.c in Sources */,
+ 435B55092A3F661F001011B8 /* receive.c in Sources */,
+ 435B550A2A3F661F001011B8 /* jniutil.c in Sources */,
+ 435B550B2A3F661F001011B8 /* init.c in Sources */,
+ 435B550C2A3F661F001011B8 /* tipc.c in Sources */,
+ 435B550D2A3F661F001011B8 /* config.c in Sources */,
+ 435B550E2A3F661F001011B8 /* credentials.c in Sources */,
+ 435B550F2A3F661F001011B8 /* socketpair.c in Sources */,
+ 435B55102A3F661F001011B8 /* exceptions.c in Sources */,
+ 435B55112A3F661F001011B8 /* reflection.c in Sources */,
+ 435B55122A3F661F001011B8 /* listen.c in Sources */,
+ 435B55132A3F661F001011B8 /* ancillary.c in Sources */,
+ 435B55142A3F661F001011B8 /* accept.c in Sources */,
+ 438F4DAE2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2927,6 +3583,7 @@
430234AB2650AB4E00823167 /* listen.c in Sources */,
430234332650AB4E00823167 /* ancillary.c in Sources */,
430233DF2650AB4E00823167 /* accept.c in Sources */,
+ 438F4D972A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2957,6 +3614,7 @@
43684DB0282EE24B005F2989 /* listen.c in Sources */,
43684DB1282EE24B005F2989 /* ancillary.c in Sources */,
43684DB2282EE24B005F2989 /* accept.c in Sources */,
+ 438F4DA52A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2987,6 +3645,7 @@
436B5AB028244CB500574CD4 /* listen.c in Sources */,
436B5AB128244CB500574CD4 /* ancillary.c in Sources */,
436B5AB228244CB500574CD4 /* accept.c in Sources */,
+ 438F4D9E2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3017,6 +3676,7 @@
436B5AEA2826F49A00574CD4 /* listen.c in Sources */,
436B5AEB2826F49A00574CD4 /* ancillary.c in Sources */,
436B5AEC2826F49A00574CD4 /* accept.c in Sources */,
+ 438F4D9F2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3047,6 +3707,7 @@
43B3DFFD26660A2D0024822F /* listen.c in Sources */,
43B3DFFE26660A2D0024822F /* ancillary.c in Sources */,
43B3DFFF26660A2D0024822F /* accept.c in Sources */,
+ 438F4DA72A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3077,6 +3738,7 @@
43B3E03526672FD30024822F /* listen.c in Sources */,
43B3E03626672FD30024822F /* ancillary.c in Sources */,
43B3E03726672FD30024822F /* accept.c in Sources */,
+ 438F4DA82A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3107,6 +3769,7 @@
43B3E06D266756540024822F /* listen.c in Sources */,
43B3E06E266756540024822F /* ancillary.c in Sources */,
43B3E06F266756540024822F /* accept.c in Sources */,
+ 438F4D992A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3137,6 +3800,38 @@
43B3E0A5266971630024822F /* listen.c in Sources */,
43B3E0A6266971630024822F /* ancillary.c in Sources */,
43B3E0A7266971630024822F /* accept.c in Sources */,
+ 438F4DA92A6AF05000546E2C /* afsystem.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 43C57CE22A38F370001DEA62 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 43C57CE32A38F370001DEA62 /* filedescriptors.c in Sources */,
+ 43C57CE42A38F370001DEA62 /* bind.c in Sources */,
+ 43C57CE52A38F370001DEA62 /* address.c in Sources */,
+ 43C57CE62A38F370001DEA62 /* vsock.c in Sources */,
+ 43C57CE72A38F370001DEA62 /* send.c in Sources */,
+ 43C57CE82A38F370001DEA62 /* socket.c in Sources */,
+ 43C57CE92A38F370001DEA62 /* pipe.c in Sources */,
+ 43C57CEA2A38F370001DEA62 /* connect.c in Sources */,
+ 43C57CEB2A38F370001DEA62 /* capabilities.c in Sources */,
+ 43C57CEC2A38F370001DEA62 /* socketoptions.c in Sources */,
+ 43C57CED2A38F370001DEA62 /* polling.c in Sources */,
+ 43C57CEE2A38F370001DEA62 /* receive.c in Sources */,
+ 43C57CEF2A38F370001DEA62 /* jniutil.c in Sources */,
+ 43C57CF02A38F370001DEA62 /* init.c in Sources */,
+ 43C57CF12A38F370001DEA62 /* tipc.c in Sources */,
+ 43C57CF22A38F370001DEA62 /* config.c in Sources */,
+ 43C57CF32A38F370001DEA62 /* credentials.c in Sources */,
+ 43C57CF42A38F370001DEA62 /* socketpair.c in Sources */,
+ 43C57CF52A38F370001DEA62 /* exceptions.c in Sources */,
+ 43C57CF62A38F370001DEA62 /* reflection.c in Sources */,
+ 43C57CF72A38F370001DEA62 /* listen.c in Sources */,
+ 43C57CF82A38F370001DEA62 /* ancillary.c in Sources */,
+ 43C57CF92A38F370001DEA62 /* accept.c in Sources */,
+ 438F4DAB2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3167,6 +3862,7 @@
430234AD2650AB4E00823167 /* listen.c in Sources */,
430234352650AB4E00823167 /* ancillary.c in Sources */,
430233E12650AB4E00823167 /* accept.c in Sources */,
+ 438F4D9A2A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3197,6 +3893,7 @@
430234B32650AB4E00823167 /* listen.c in Sources */,
4302343B2650AB4E00823167 /* ancillary.c in Sources */,
430233E72650AB4E00823167 /* accept.c in Sources */,
+ 438F4DA22A6AF05000546E2C /* afsystem.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3263,6 +3960,21 @@
target = 432EF1F7261ADEDD00F4A583 /* armv6--linux-gnueabihf */;
targetProxy = 432EF204261AE01000F4A583 /* PBXContainerItemProxy */;
};
+ 435B54A32A3F65ED001011B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 435B54682A3F65D2001011B8 /* x86_64-linux-android30 */;
+ targetProxy = 435B54A22A3F65ED001011B8 /* PBXContainerItemProxy */;
+ };
+ 435B54DF2A3F6617001011B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 435B54A42A3F65F4001011B8 /* i686-linux-android30 */;
+ targetProxy = 435B54DE2A3F6617001011B8 /* PBXContainerItemProxy */;
+ };
+ 435B551B2A3F6658001011B8 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 435B54E02A3F661F001011B8 /* arm-linux-androideabi30 */;
+ targetProxy = 435B551A2A3F6658001011B8 /* PBXContainerItemProxy */;
+ };
43684DB9282EE2CA005F2989 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 43684D80282EE24B005F2989 /* aarch64-w64-mingw32 */;
@@ -3303,6 +4015,11 @@
target = 432EF206261AE29200F4A583 /* x86_64-apple-darwin18.2.0 */;
targetProxy = 43D0E25B261AE48B008F2FFE /* PBXContainerItemProxy */;
};
+ 43EE6B472A3B3D0700E6F8F2 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 43C57CC52A38F370001DEA62 /* aarch64-linux-android30 */;
+ targetProxy = 43EE6B462A3B3D0700E6F8F2 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@@ -3314,7 +4031,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3343,7 +4060,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3369,6 +4086,8 @@
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
@@ -3378,6 +4097,8 @@
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
@@ -3390,7 +4111,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3415,7 +4136,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3440,7 +4161,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3470,7 +4191,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3500,7 +4221,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3527,7 +4248,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3554,7 +4275,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3580,7 +4301,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3606,7 +4327,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3631,7 +4352,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3656,7 +4377,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3681,7 +4402,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3706,7 +4427,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3735,7 +4456,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3764,7 +4485,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3789,7 +4510,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3810,12 +4531,13 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
+ CODE_SIGN_IDENTITY = "-";
CROSSCLANG_TARGET = "x86_64-apple-darwin18.2.0";
EXECUTABLE_EXTENSION = dylib;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
LLVM_LTO = YES;
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3837,12 +4559,13 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
+ CODE_SIGN_IDENTITY = "-";
CROSSCLANG_TARGET = "x86_64-apple-darwin18.2.0";
EXECUTABLE_EXTENSION = dylib;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
LLVM_LTO = YES;
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3860,15 +4583,178 @@
};
name = Release;
};
+ 435B549F2A3F65D2001011B8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "x86_64-linux-android30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Debug;
+ };
+ 435B54A02A3F65D2001011B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "x86_64-linux-android30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Release;
+ };
+ 435B54DB2A3F65F4001011B8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "i686-linux-android30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Debug;
+ };
+ 435B54DC2A3F65F4001011B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "i686-linux-android30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Release;
+ };
+ 435B55172A3F661F001011B8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "arm-linux-androideabi30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Debug;
+ };
+ 435B55182A3F661F001011B8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "arm-linux-androideabi30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Release;
+ };
43663EE0261AECC400CEED08 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
+ CODE_SIGN_IDENTITY = "-";
CROSSCLANG_TARGET = current;
EXECUTABLE_EXTENSION = dylib;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3888,11 +4774,12 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
+ CODE_SIGN_IDENTITY = "-";
CROSSCLANG_TARGET = current;
EXECUTABLE_EXTENSION = dylib;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3916,7 +4803,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3947,7 +4834,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -3983,7 +4870,7 @@
);
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4019,7 +4906,7 @@
);
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4057,7 +4944,7 @@
);
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4094,7 +4981,7 @@
);
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4126,7 +5013,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4152,7 +5039,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4178,7 +5065,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4203,7 +5090,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4228,7 +5115,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4254,7 +5141,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4281,7 +5168,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-fno-lto",
@@ -4314,7 +5201,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-fno-lto",
@@ -4338,15 +5225,70 @@
};
name = Release;
};
+ 43C57CFC2A38F370001DEA62 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "aarch64-linux-android30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Debug;
+ };
+ 43C57CFD2A38F370001DEA62 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CROSSCLANG_TARGET = "aarch64-linux-android30";
+ EXECUTABLE_EXTENSION = so;
+ LD_DEPENDENCY_INFO_FILE = "";
+ LD_LTO_OBJECT_FILE = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-fPIC",
+ "-Wno-unknown-warning-option",
+ );
+ OTHER_LDFLAGS = (
+ "$(inherited)",
+ "-target",
+ "$(CROSSCLANG_TARGET)",
+ "-Qunused-arguments",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = crossclang.macosx1.0;
+ };
+ name = Release;
+ };
43C5FB7B261AC3700088E301 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
+ CODE_SIGN_IDENTITY = "-";
CROSSCLANG_TARGET = "arm64-apple-macos11";
EXECUTABLE_EXTENSION = dylib;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4366,11 +5308,12 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
+ CODE_SIGN_IDENTITY = "-";
CROSSCLANG_TARGET = "arm64-apple-macos11";
EXECUTABLE_EXTENSION = dylib;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4414,6 +5357,7 @@
CODE_SIGN_STYLE = Manual;
COMPILER_INDEX_STORE_ENABLE = NO;
COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
EXECUTABLE_PREFIX = "libjunixsocket-";
@@ -4429,7 +5373,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ GENERATE_INTERMEDIATE_TEXT_BASED_STUBS = NO;
HEADER_SEARCH_PATHS = src/main/c/jni;
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-fno-strict-overflow",
@@ -4441,7 +5387,7 @@
"-fno-common",
"-fvisibility=hidden",
);
- OTHER_LDFLAGS = "";
+ OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible";
RUN_CLANG_STATIC_ANALYZER = YES;
SKIP_INSTALL = YES;
WARNING_CFLAGS = (
@@ -4463,6 +5409,7 @@
"-Wno-unused-command-line-argument",
"-Werror-implicit-function-declaration",
"-Wno-declaration-after-statement",
+ "-Wno-unsafe-buffer-usage",
);
};
name = Debug;
@@ -4495,6 +5442,7 @@
CODE_SIGN_STYLE = Manual;
COMPILER_INDEX_STORE_ENABLE = NO;
COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
EXECUTABLE_PREFIX = "libjunixsocket-";
GCC_CW_ASM_SYNTAX = NO;
@@ -4508,7 +5456,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
+ GENERATE_INTERMEDIATE_TEXT_BASED_STUBS = NO;
HEADER_SEARCH_PATHS = src/main/c/jni;
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-fno-strict-overflow",
@@ -4520,7 +5470,7 @@
"-fno-common",
"-fvisibility=hidden",
);
- OTHER_LDFLAGS = "";
+ OTHER_LDFLAGS = "-Xcrossclang-ignore-reproducible";
RUN_CLANG_STATIC_ANALYZER = YES;
SKIP_INSTALL = YES;
WARNING_CFLAGS = (
@@ -4542,6 +5492,7 @@
"-Wno-unused-command-line-argument",
"-Werror-implicit-function-declaration",
"-Wno-declaration-after-statement",
+ "-Wno-unsafe-buffer-usage",
);
};
name = Release;
@@ -4554,7 +5505,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4586,7 +5537,7 @@
EXECUTABLE_EXTENSION = so;
LD_DEPENDENCY_INFO_FILE = "";
LD_LTO_OBJECT_FILE = "";
- MACOSX_DEPLOYMENT_TARGET = "";
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
"$(inherited)",
"-target",
@@ -4712,6 +5663,33 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 435B549E2A3F65D2001011B8 /* Build configuration list for PBXNativeTarget "x86_64-linux-android30" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 435B549F2A3F65D2001011B8 /* Debug */,
+ 435B54A02A3F65D2001011B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 435B54DA2A3F65F4001011B8 /* Build configuration list for PBXNativeTarget "i686-linux-android30" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 435B54DB2A3F65F4001011B8 /* Debug */,
+ 435B54DC2A3F65F4001011B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 435B55162A3F661F001011B8 /* Build configuration list for PBXNativeTarget "arm-linux-androideabi30" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 435B55172A3F661F001011B8 /* Debug */,
+ 435B55182A3F661F001011B8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
43663EDF261AECC400CEED08 /* Build configuration list for PBXNativeTarget "current" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -4784,6 +5762,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 43C57CFB2A38F370001DEA62 /* Build configuration list for PBXNativeTarget "aarch64-linux-android30" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 43C57CFC2A38F370001DEA62 /* Debug */,
+ 43C57CFD2A38F370001DEA62 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
43C5FB7A261AC3700088E301 /* Build configuration list for PBXNativeTarget "arm64-apple-macos11" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme b/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme
index 9f879e63b..a3388611f 100644
--- a/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme
+++ b/junixsocket-native/junixsocket-native.xcodeproj/xcshareddata/xcschemes/All Architectures.xcscheme
@@ -1,6 +1,6 @@
+
+
+