Example #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected synchronized void accept(SocketImpl s) throws IOException
        protected internal override void Accept(SocketImpl s)
        {
            lock (this)
            {
                if (s is PlainSocketImpl)
                {
                    // pass in the real impl not the wrapper.
                    SocketImpl @delegate = ((PlainSocketImpl)s).Impl;
                    @delegate.Address = new InetAddress();
                    @delegate.Fd      = new FileDescriptor();
                    Impl.Accept(@delegate);
                    // set fd to delegate's fd to be compatible with older releases
                    s.Fd = @delegate.Fd;
                }
                else
                {
                    Impl.Accept(s);
                }
            }
        }