Package gnu.java.nio

Examples of gnu.java.nio.SocketChannelImpl


   * @param stream <code>true</code> for stream sockets, <code>false</code> for
   *        datagram sockets
   */
  protected synchronized void create(boolean stream) throws IOException
  {
    channel = new SocketChannelImpl(false);
    VMChannel vmchannel = channel.getVMChannel();
    vmchannel.initSocket(stream);
    channel.configureBlocking(true);
    impl.getState().setChannelFD(vmchannel.getState());
    if (initialTimeout != 0)
View Full Code Here


      throw new IOException("incompatible SocketImpl: "
                            + impl.getClass().getName());
    PlainSocketImpl that = (PlainSocketImpl) impl;
    VMChannel c = channel.getVMChannel().accept();
    that.impl.getState().setChannelFD(c.getState());
    that.channel = new SocketChannelImpl(c);
    that.setOption(SO_REUSEADDR, Boolean.TRUE);
    // Reset the inherited timeout.
    that.setOption(SO_TIMEOUT, Integer.valueOf(0));

  }
View Full Code Here

TOP

Related Classes of gnu.java.nio.SocketChannelImpl

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.