org.lirc.socket
Class UnixServerSocket

java.lang.Object
  |
  +--org.lirc.socket.UnixServerSocket

public class UnixServerSocket
extends java.lang.Object

A Unix domain server socket. The interface is similar to the ServerSocket class from the standard library.

Version:
$Revision: 1.1 $
Author:
Bjorn Bringert (bjorn@mumblebee.com)

Constructor Summary
UnixServerSocket(java.lang.String path)
          Creates a new UnixServerSocket.
UnixServerSocket(java.lang.String path, int backlog)
          Creates a new UnixServerSocket.
 
Method Summary
 UnixSocket accept()
          Listens for a connection to be made to this socket and accepts it.
 void close()
          Closes this socket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnixServerSocket

public UnixServerSocket(java.lang.String path)
                 throws java.io.IOException
Creates a new UnixServerSocket.
Parameters:
path - The path name of the socket to connect to
Throws:
java.io.IOException - If there is a problem creating the socket

UnixServerSocket

public UnixServerSocket(java.lang.String path,
                        int backlog)
                 throws java.io.IOException
Creates a new UnixServerSocket.
Parameters:
path - The path name of the socket to connect to
backlog - The maximum length of the queue
Throws:
java.io.IOException - If there is a problem creating the socket
Method Detail

close

public void close()
           throws java.io.IOException
Closes this socket
Throws:
java.io.IOException - If there is a problem closing the socket

accept

public UnixSocket accept()
                  throws java.io.IOException
Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made.
Returns:
the new UnixSocket
Throws:
java.io.IOException - if an I/O error occurs when waiting for a connection.