Package java.io

Examples of java.io.FileDescriptor


  public int[] select(SelectableChannel[] readChannels,
      SelectableChannel[] writeChannels, long timeout)
      throws SocketException {

    FileDescriptor fdHandler = null;
    int countRead = readChannels.length;
    int countWrite = writeChannels.length;
    int result = 0, val;
    FileDescriptor[] readFDs = new FileDescriptor[countRead];
    int[] flags = new int[countRead + countWrite];
View Full Code Here


                // if newImpl is not an instance of PlainSocketImpl, use
                // reflection to get/set protected fields.
                if (null == fdField) {
                    fdField = getSocketImplField("fd"); // $NON-NLS-1$
                }
                FileDescriptor newFd = (FileDescriptor) fdField.get(newImpl);
                netImpl.acceptStreamSocket(fd, newImpl, newFd, receiveTimeout);

                if (null == localportField) {
                    localportField = getSocketImplField("localport"); // $NON-NLS-1$
                }
View Full Code Here

                        shutdownOutput();
                    } catch (Exception e) {
                    }
                }
                netImpl.socketClose(fd);
                fd = new FileDescriptor();
            }
        }
    }
View Full Code Here

        this.localPort = localPort;
    }

    public PlainDatagramSocketImpl() {
        super();
        fd = new FileDescriptor();
    }
View Full Code Here

            if (fd.valid()) {
                try {
                    netImpl.socketClose(fd);
                } catch (IOException e) {
                }
                fd = new FileDescriptor();
            }
        }
    }
View Full Code Here

     * Constructor
     */
    protected DatagramChannelImpl(SelectorProvider selectorProvider)
            throws IOException {
        super(selectorProvider);
        fd = new FileDescriptor();
        networkSystem.createDatagramSocket(fd, true);
    }
View Full Code Here

    /*
     * for native call
     */
    private DatagramChannelImpl() throws IOException {
        super(SelectorProvider.provider());
        fd = new FileDescriptor();
        connectAddress = new InetSocketAddress(0);
    }
View Full Code Here

        return isReachableByMultiThread(netif, ttl, timeout, false);
    }   
   
    private boolean isReachableByTCP(InetAddress dest, InetAddress source,
            int timeout) throws IOException {
        FileDescriptor fd = new FileDescriptor();
        // define traffic only for parameter
        int traffic = 0;
        boolean reached = false;
        NETIMPL.createSocket(fd, NetUtil.preferIPv4Stack());
        try {
View Full Code Here

     * Constructor
     */
    public SocketChannelImpl(SelectorProvider selectorProvider)
            throws IOException {
        super(selectorProvider);
        fd = new FileDescriptor();
        status = SOCKET_STATUS_UNCONNECTED;
        networkSystem.createSocket(fd, true);
    }
View Full Code Here

    /*
     * for native call
     */
    private SocketChannelImpl() throws IOException {
    super(SelectorProvider.provider());
    fd = new FileDescriptor();
    connectAddress = new InetSocketAddress(0);
    status = SOCKET_STATUS_CONNECTED;
  }
View Full Code Here

TOP

Related Classes of java.io.FileDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.