jnr.unixsocket
Class UnixSocketChannel

java.lang.Object
  extended by java.nio.channels.spi.AbstractInterruptibleChannel
      extended by java.nio.channels.SelectableChannel
          extended by java.nio.channels.spi.AbstractSelectableChannel
              extended by jnr.enxio.channels.NativeSocketChannel
                  extended by jnr.unixsocket.UnixSocketChannel
All Implemented Interfaces:
Closeable, ByteChannel, Channel, InterruptibleChannel, ReadableByteChannel, WritableByteChannel, jnr.enxio.channels.NativeSelectableChannel

public class UnixSocketChannel
extends jnr.enxio.channels.NativeSocketChannel

A Channel implementation that uses a native unix socket


Method Summary
 boolean connect(UnixSocketAddress remote)
           
 boolean finishConnect()
           
 boolean getKeepAlive()
           
 UnixSocketAddress getLocalSocketAddress()
           
 UnixSocketAddress getRemoteSocketAddress()
           
 int getSoTimeout()
           
 boolean isConnected()
           
 boolean isConnectionPending()
           
static UnixSocketChannel open()
           
static UnixSocketChannel open(UnixSocketAddress remote)
           
static UnixSocketChannel[] pair()
           
 void setKeepAlive(boolean on)
           
 void setSoTimeout(int timeout)
           
 
Methods inherited from class jnr.enxio.channels.NativeSocketChannel
getFD, implCloseSelectableChannel, implConfigureBlocking, read, shutdownInput, shutdownOutput, validOps, write
 
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
 
Methods inherited from class java.nio.channels.SelectableChannel
register
 
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Method Detail

open

public static final UnixSocketChannel open()
                                    throws IOException
Throws:
IOException

open

public static final UnixSocketChannel open(UnixSocketAddress remote)
                                    throws IOException
Throws:
IOException

pair

public static final UnixSocketChannel[] pair()
                                      throws IOException
Throws:
IOException

connect

public boolean connect(UnixSocketAddress remote)
                throws IOException
Throws:
IOException

isConnected

public boolean isConnected()

isConnectionPending

public boolean isConnectionPending()

finishConnect

public boolean finishConnect()
                      throws IOException
Throws:
IOException

getRemoteSocketAddress

public final UnixSocketAddress getRemoteSocketAddress()

getLocalSocketAddress

public final UnixSocketAddress getLocalSocketAddress()

getKeepAlive

public boolean getKeepAlive()

setKeepAlive

public void setKeepAlive(boolean on)

getSoTimeout

public int getSoTimeout()

setSoTimeout

public void setSoTimeout(int timeout)


Copyright © 2014. All Rights Reserved.