diff options
author | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
commit | c5959fd09de61604bedd75354401df6a57395d65 (patch) | |
tree | 3b0227f631c8b20fb1a1a274b92f63f52f34af2c /csharp/src | |
parent | Small fix (diff) | |
parent | Enable -Wconversion with clang - Close #363 (diff) | |
download | ice-c5959fd09de61604bedd75354401df6a57395d65.tar.bz2 ice-c5959fd09de61604bedd75354401df6a57395d65.tar.xz ice-c5959fd09de61604bedd75354401df6a57395d65.zip |
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/Ice/Network.cs | 8 | ||||
-rw-r--r-- | csharp/src/Ice/Proxy.cs | 17 |
2 files changed, 21 insertions, 4 deletions
diff --git a/csharp/src/Ice/Network.cs b/csharp/src/Ice/Network.cs index 6f32f4c4ef3..bcd2200ab4b 100644 --- a/csharp/src/Ice/Network.cs +++ b/csharp/src/Ice/Network.cs @@ -526,7 +526,7 @@ namespace IceInternal #if NETSTANDARD2_0 [DllImport("libc", SetLastError = true)] - private static extern int setsockopt(int socket, int level, int name, IntPtr value, uint len); + private static extern int setsockopt(int socket, int level, int name, ref int value, uint len); private const int SOL_SOCKET_MACOS= 0xffff; private const int SO_REUSEADDR_MACOS = 0x0004; @@ -534,7 +534,7 @@ namespace IceInternal private const int SO_REUSEADDR_LINUX = 0x0002; #endif - public static unsafe IPEndPoint doBind(Socket socket, EndPoint addr) + public static IPEndPoint doBind(Socket socket, EndPoint addr) { try { @@ -549,11 +549,11 @@ namespace IceInternal var fd = socket.Handle.ToInt32(); if(AssemblyUtil.isLinux) { - err = setsockopt(fd, SOL_SOCKET_LINUX, SO_REUSEADDR_LINUX, (IntPtr)(&value), sizeof(int)); + err = setsockopt(fd, SOL_SOCKET_LINUX, SO_REUSEADDR_LINUX, ref value, sizeof(int)); } else if(AssemblyUtil.isMacOS) { - err = setsockopt(fd, SOL_SOCKET_MACOS, SO_REUSEADDR_MACOS, (IntPtr)(&value), sizeof(int)); + err = setsockopt(fd, SOL_SOCKET_MACOS, SO_REUSEADDR_MACOS, ref value, sizeof(int)); } if(err != 0) { diff --git a/csharp/src/Ice/Proxy.cs b/csharp/src/Ice/Proxy.cs index ba7fed5fe1f..c687b8a58a2 100644 --- a/csharp/src/Ice/Proxy.cs +++ b/csharp/src/Ice/Proxy.cs @@ -706,6 +706,13 @@ namespace Ice ObjectPrx ice_fixed(Ice.Connection connection); /// <summary> + /// Returns whether this proxy is a fixed proxy. + /// </summary> + /// <returns>True if this is a fixed proxy, false otherwise. + /// </returns> + bool ice_isFixed(); + + /// <summary> /// Returns the Connection for this proxy. If the proxy does not yet have an established connection, /// it first attempts to create a connection. /// </summary> @@ -2186,6 +2193,16 @@ namespace Ice } } + /// <summary> + /// Returns whether this proxy is a fixed proxy. + /// </summary> + /// <returns>True if this is a fixed proxy, false otherwise. + /// </returns> + public bool ice_isFixed() + { + return _reference is IceInternal.FixedReference; + } + private class ProxyGetConnectionAsyncCallback : ProxyAsyncResultCompletionCallback<Callback_Object_ice_getConnection> { public ProxyGetConnectionAsyncCallback(ObjectPrxHelperBase proxy, string operation, object cookie, |