Beispiel #1
0
        public static int connect0(bool preferIPv6, FileDescriptor fd, InetAddress remote, int remotePort)
        {
#if FIRST_PASS
            return(0);
#else
            try
            {
                System.Net.IPEndPoint ep = new System.Net.IPEndPoint(global::java.net.SocketUtil.getAddressFromInetAddress(remote, preferIPv6), remotePort);
                bool datagram            = fd.getSocket().SocketType == System.Net.Sockets.SocketType.Dgram;
                if (datagram || fd.isSocketBlocking())
                {
                    fd.getSocket().Connect(ep);
                    if (datagram)
                    {
                        setConnectionReset(fd.getSocket(), true);
                    }
                    return(1);
                }
                else
                {
                    fd.setAsyncResult(fd.getSocket().BeginConnect(ep, null, null));
                    return(global::sun.nio.ch.IOStatus.UNAVAILABLE);
                }
            }
            catch (System.Net.Sockets.SocketException x)
            {
                throw new global::java.net.ConnectException(x.Message);
            }
            catch (System.ObjectDisposedException)
            {
                throw new global::java.net.SocketException("Socket is closed");
            }
#endif
        }
Beispiel #2
0
        public static int connect0(bool preferIPv6, FileDescriptor fd, InetAddress remote, int remotePort)
        {
#if FIRST_PASS
            return(0);
#else
            throw new NotImplementedException("connect0");
            //try
            //{
            //	System.Net.IPEndPoint ep = new System.Net.IPEndPoint(global::java.net.SocketUtil.getAddressFromInetAddress(remote, preferIPv6), remotePort);
            //	bool datagram = fd.getSocket().SocketType == System.Net.Sockets.SocketType.Dgram;
            //	if (datagram || fd.isSocketBlocking())
            //	{
            //		fd.getSocket().Connect(ep);
            //		if (datagram)
            //		{
            //			setConnectionReset(fd.getSocket(), true);
            //		}
            //		return 1;
            //	}
            //	else
            //	{
            //		fd.setAsyncResult(fd.getSocket().BeginConnect(ep, null, null));
            //		return global::sun.nio.ch.IOStatus.UNAVAILABLE;
            //	}
            //}
            //catch (System.Net.Sockets.SocketException x)
            //{
            //	throw new global::java.net.ConnectException(x.Message);
            //}
            //catch (System.ObjectDisposedException)
            //{
            //	throw new global::java.net.SocketException("Socket is closed");
            //}
#endif
        }
Beispiel #3
0
 protected override void bind(java.net.InetAddress arg0, int arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::java.net.SocketImpl_._bind13846, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::java.net.SocketImpl_.staticClass, global::java.net.SocketImpl_._bind13846, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
 }
 public override global::java.net.Socket createSocket(java.net.InetAddress arg0, int arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::android.net.SSLCertificateSocketFactory._createSocket5248, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1))) as java.net.Socket);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.net.SSLCertificateSocketFactory.staticClass, global::android.net.SSLCertificateSocketFactory._createSocket5248, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1))) as java.net.Socket);
     }
 }
Beispiel #5
0
 public override global::java.net.Socket createSocket(java.net.InetAddress arg0, int arg1, java.net.InetAddress arg2, int arg3)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::javax.net.ssl.SSLSocketFactory_._createSocket16051, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3))) as java.net.Socket);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::javax.net.ssl.SSLSocketFactory_.staticClass, global::javax.net.ssl.SSLSocketFactory_._createSocket16051, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3))) as java.net.Socket);
     }
 }
Beispiel #6
0
 protected virtual void connect(java.net.InetAddress arg0, int arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::java.net.DatagramSocketImpl._connect13645, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::java.net.DatagramSocketImpl.staticClass, global::java.net.DatagramSocketImpl._connect13645, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
 }
Beispiel #7
0
 protected override void leave(java.net.InetAddress arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::java.net.DatagramSocketImpl_._leave13674, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::java.net.DatagramSocketImpl_.staticClass, global::java.net.DatagramSocketImpl_._leave13674, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Beispiel #8
0
 protected override int peek(java.net.InetAddress arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallIntMethod(this.JvmHandle, global::java.net.DatagramSocketImpl_._peek13664, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
     else
     {
         return(@__env.CallNonVirtualIntMethod(this.JvmHandle, global::java.net.DatagramSocketImpl_.staticClass, global::java.net.DatagramSocketImpl_._peek13664, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
 }
Beispiel #9
0
 public void setAddress(java.net.InetAddress arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::java.net.DatagramPacket._setAddress13593, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::java.net.DatagramPacket.staticClass, global::java.net.DatagramPacket._setAddress13593, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Beispiel #10
0
        public static void bind0(bool preferIPv6, FileDescriptor fd, InetAddress addr, int port)
        {
#if !FIRST_PASS
            try
            {
                fd.getSocket().Bind(new System.Net.IPEndPoint(global::java.net.SocketUtil.getAddressFromInetAddress(addr, preferIPv6), port));
            }
            catch (System.Net.Sockets.SocketException x)
            {
                throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
            }
            catch (System.ObjectDisposedException)
            {
                throw new global::java.net.SocketException("Socket is closed");
            }
#endif
        }
Beispiel #11
0
 protected abstract int peek(java.net.InetAddress arg0);
Beispiel #12
0
 protected abstract void join(java.net.InetAddress arg0);
Beispiel #13
0
 public virtual bool requestRouteToHostAddress(int networkType, java.net.InetAddress
                                               hostAddress)
 {
     throw new System.NotImplementedException();
 }
Beispiel #14
0
 public DatagramPacket(byte[] arg0, int arg1, java.net.InetAddress arg2, int arg3)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.net.DatagramPacket.staticClass, global::java.net.DatagramPacket._DatagramPacket13601, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3));
     Init(@__env, handle);
 }
Beispiel #15
0
 global::java.net.Socket org.apache.http.conn.scheme.SocketFactory.connectSocket(java.net.Socket arg0, java.lang.String arg1, int arg2, java.net.InetAddress arg3, int arg4, [email protected] arg5)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::org.apache.http.conn.scheme.SocketFactory_._connectSocket16418, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg5))) as java.net.Socket);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::org.apache.http.conn.scheme.SocketFactory_.staticClass, global::org.apache.http.conn.scheme.SocketFactory_._connectSocket16418, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg5))) as java.net.Socket);
     }
 }
Beispiel #16
0
        public static void bind0(FileDescriptor fd, bool preferIPv6, bool useExclBind, InetAddress addr, int port)
        {
#if !FIRST_PASS
            throw new NotImplementedException("bind0");
            //try
            //{
            //	if (useExclBind)
            //	{
            //		global::java.net.net_util_md.setExclusiveBind(fd.getSocket());
            //	}
            //	fd.getSocket().Bind(new System.Net.IPEndPoint(global::java.net.SocketUtil.getAddressFromInetAddress(addr, preferIPv6), port));
            //}
            //catch (System.Net.Sockets.SocketException x)
            //{
            //	throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
            //}
            //catch (System.ObjectDisposedException)
            //{
            //	throw new global::java.net.SocketException("Socket is closed");
            //}
#endif
        }
Beispiel #17
0
 public HttpRoute(org.apache.http.HttpHost arg0, java.net.InetAddress arg1, org.apache.http.HttpHost arg2, bool arg3)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(org.apache.http.conn.routing.HttpRoute.staticClass, global::org.apache.http.conn.routing.HttpRoute._HttpRoute16376, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3));
     Init(@__env, handle);
 }
Beispiel #18
0
        public static void bind0(FileDescriptor fd, bool preferIPv6, bool useExclBind, InetAddress addr, int port)
        {
#if !FIRST_PASS
            try
            {
                if (useExclBind)
                {
                    // TODO enable this after we merge OpenJDK 7u40
                    //global::java.net.net_util_md.setExclusiveBind(fd.getSocket());
                }
                fd.getSocket().Bind(new System.Net.IPEndPoint(global::java.net.SocketUtil.getAddressFromInetAddress(addr, preferIPv6), port));
            }
            catch (System.Net.Sockets.SocketException x)
            {
                throw global::java.net.SocketUtil.convertSocketExceptionToIOException(x);
            }
            catch (System.ObjectDisposedException)
            {
                throw new global::java.net.SocketException("Socket is closed");
            }
#endif
        }
Beispiel #19
0
 protected abstract void connect(java.net.InetAddress arg0, int arg1);
Beispiel #20
0
		public static global::java.net.NetworkInterface getByInetAddress(java.net.InetAddress arg0) 
		{
			global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
			return global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallStaticObjectMethod(java.net.NetworkInterface.staticClass, global::java.net.NetworkInterface._getByInetAddress13713, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as java.net.NetworkInterface;
		}
Beispiel #21
0
 protected abstract void bind(int arg0, java.net.InetAddress arg1);
Beispiel #22
0
 protected SSLSocket(java.lang.String arg0, int arg1, java.net.InetAddress arg2, int arg3)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(javax.net.ssl.SSLSocket.staticClass, global::javax.net.ssl.SSLSocket._SSLSocket16020, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3));
     Init(@__env, handle);
 }
Beispiel #23
0
 public abstract global::java.net.Socket createSocket(java.net.InetAddress arg0, int arg1, java.net.InetAddress arg2, int arg3);
Beispiel #24
0
 protected abstract void leave(java.net.InetAddress arg0);
 public abstract MembershipKey Join(java.net.InetAddress group, java.net.NetworkInterface interf);
Beispiel #26
0
 public ServerSocket(int arg0, int arg1, java.net.InetAddress arg2)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(java.net.ServerSocket.staticClass, global::java.net.ServerSocket._ServerSocket13757, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     Init(@__env, handle);
 }