Class TelnetSerialPort


  • public class TelnetSerialPort
    extends SerialPort
    Implements the client side of the RFC 2217 serial-over-Telnet protocol as as SerialPort. This class extends the SerialPort class and functions in the same way, however, there are a couple of differences to be aware of:
    • To "open" a serial port, create an instance of this class, configure it as required, and then get the TelnetClient via getTelnetClient() and invoke TelnetClient.connect() (or one of its variants). This will create the telnet connection to the access server.
    • Once connected, if the underlying telnet connection is broken, an IOException will be thrown when attempting to access the serial port input or output streams. In addition, a DATA_AVAILABLE event will be immediately generated.
    The following optional functionality is not implemented and/or inappropriate for a networked connection:
    • Receive threshold
    • Receive timeout
    • Receive framing byte
    • Input buffer size
    • Output buffer size
    In addition, access servers typically don't support notifyOnOutputEmpty(boolean). Finally, sendBreak(int) is supported but the millis argument is ignored, as timing cannot be assured over a TCP connection. Access servers typically enforce a fixed break time.
    See Also:
    SerialPort, RFC 2217