org.lirc
Class TCPReceiver

java.lang.Object
  |
  +--org.lirc.StreamReceiver
        |
        +--org.lirc.TCPReceiver
All Implemented Interfaces:
Receiver

public class TCPReceiver
extends StreamReceiver

Reads signals from the WINLircd TCP socket (normally port 8765). Don't use this class directly, use ReceiverFactory instead.

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

Constructor Summary
TCPReceiver()
          Connects to the socket.
TCPReceiver(int port)
          Connects to the socket.
 
Method Summary
 void close()
          Disconnects from the socket.
 
Methods inherited from class org.lirc.StreamReceiver
finalize, readCode, setInput
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPReceiver

public TCPReceiver()
            throws LIRCException
Connects to the socket. If the system property org.lirc.TCPReceiver.port is set its value is used as the port number, otherwise 8765 is used.
Throws:
LIRCException - if it cannot connect, or if the value of org.lirc.TCPReceiver.port cannot be converted to an integer.

TCPReceiver

public TCPReceiver(int port)
            throws LIRCException
Connects to the socket.
Parameters:
port - The port to connect to
Throws:
LIRCException - if it cannot connect.
Method Detail

close

public void close()
Disconnects from the socket.
Overrides:
close in class StreamReceiver