org.apache.commons.net.telnet
Class TelnetTestSimpleServer

java.lang.Object
  extended by org.apache.commons.net.telnet.TelnetTestSimpleServer
All Implemented Interfaces:
Runnable

public class TelnetTestSimpleServer
extends Object
implements Runnable

Simple TCP server. Waits for connections on a TCP port in a separate thread.

Author:
Bruno D'Avanzo

Constructor Summary
TelnetTestSimpleServer(int port)
          test of client-driven subnegotiation.
 
Method Summary
 void disconnect()
          Disconnects the client socket
 InputStream getInputStream()
          Gets the input stream for the client socket
 OutputStream getOutputStream()
          Gets the output stream for the client socket
 void run()
          Run for the thread.
 void stop()
          Stop the listener thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelnetTestSimpleServer

public TelnetTestSimpleServer(int port)
                       throws IOException
test of client-driven subnegotiation.

Parameters:
port - - server port on which to listen.
Throws:
IOException
Method Detail

run

public void run()
Run for the thread. Waits for new connections

Specified by:
run in interface Runnable

disconnect

public void disconnect()
Disconnects the client socket


stop

public void stop()
Stop the listener thread


getInputStream

public InputStream getInputStream()
                           throws IOException
Gets the input stream for the client socket

Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Gets the output stream for the client socket

Throws:
IOException


Copyright © 1997-2011 Apache Software Foundation. All Rights Reserved.