IP*Works!

ipworks
Class Telnet

java.lang.Object
  |
  +--ipworks.Telnet

public class Telnet
extends java.lang.Object

The Telnet control is used to communicate with servers implementing the TELNET protocol.

The Telnet control provides a simple interface to Telnet communications as specified by RFC 854. It allows sending of Telnet command codes to remote Telnet servers and it scans the input data for Telnet commands. Appropriate events are fired for received commands.

The connection interface is very similar to that of IPPort. The same properties and events are used for sending and receiving normal data, and the same property set is used for setting properties of the connection. The Telnet control adds a number of properties like Command , DoOption , etc. which allow sending of Telnet commands to the other end. The respective events ( Command , Do , etc.) are fired when the corresponding Telnet commands are received.


Field Summary
static int fwNone
           
static int fwSOCKS4
           
static int fwSOCKS5
           
static int fwTunnel
           
 
Constructor Summary
Telnet()
           
 
Method Summary
 void addTelnetEventListener(TelnetEventListener l)
           
 void connect(java.lang.String host)
          Connect to a remote host.
 void disconnect()
          Disconnect from the remote host.
 void fireCommand(int commandCode)
          Fired when a Telnet command comes from the Telnet server.
 void fireConnected(int statusCode, java.lang.String description)
          Fired immediately after a connection completes (or fails).
 void fireDataIn(byte[] text)
          Fired when characters are received from the remote host.
 void fireDisconnected(int statusCode, java.lang.String description)
          Fired when a connection is closed.
 void fireDoDo(int optionCode)
          Fired when a Telnet DO OPTION command comes from the Telnet server.
 void fireDont(int optionCode)
          Fired when a Telnet DONT OPTION command comes from the Telnet server.
 void fireError(int errorCode, java.lang.String description)
          Information about errors during data delivery.
 void fireReadyToSend()
          Fired when the component is ready to send data.
 void fireSubOption(byte[] subOption)
          Fired when a Telnet suboption command comes from the Telnet server.
 void fireWill(int optionCode)
          Fired when a Telnet WILL OPTION command comes from the Telnet server.
 void fireWont(int optionCode)
          Fired when a Telnet WONT OPTION command comes from the Telnet server.
 int getBytesSent()
          The number of bytes actually sent after an assignment to DataToSend .
 byte[] getFirewallData()
          Used to send other data to firewall.
 java.lang.String getFirewallHost()
          Name or IP address of firewall (optional).
 java.lang.String getFirewallPassword()
          A password if authentication is to be used connecting through the firewall.
 int getFirewallPort()
          Port of the firewall to connect to.
 int getFirewallType()
          Determines the type of firewall to connect through.
 java.lang.String getFirewallUser()
          A user name if authentication is to be used connecting through a firewall.
 java.lang.String getLocalHost()
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 int getLocalPort()
          The TCP port in the local host where IPPort binds.
 java.lang.String getRemoteHost()
          The address of the remote host.
 int getRemotePort()
          The Telnet port in the remote host (default is 23).
 int getTimeout()
          A timeout for the component.
 boolean isAcceptData()
          Enables or disables data reception (the DataIn event).
 boolean isConnected()
          Triggers a connection or disconnection.
 boolean isKeepAlive()
          When True, KEEPALIVE packets are enabled (for long connections).
 boolean isLinger()
          When set to True, connections are terminated gracefully.
 boolean isTransparent()
          When True, Telnet command processing is disabled.
 void removeTelnetEventListener(TelnetEventListener l)
           
 void send(byte[] text)
          Send data to the remote host.
 void setAcceptData(boolean acceptData)
          Enables or disables data reception (the DataIn event).
 void setCommand(int command)
          A single character Telnet command code to be sent to the server.
 void setConnected(boolean connected)
          Triggers a connection or disconnection.
 void setDataToSend(byte[] dataToSend)
          A string of data to be sent to the remote host.
 void setDontOption(int dontOption)
          A single character Telnet option code to be sent to the server with the Telnet DONT command.
 void setDoOption(int doOption)
          A single character Telnet option code to be sent to the server with the Telnet DO command.
 void setDoSubOption(byte[] doSubOption)
          A Telnet suboption to send to the server with the suboption command.
 void setFirewallData(byte[] firewallData)
          Used to send other data to firewall.
 void setFirewallHost(java.lang.String firewallHost)
          Name or IP address of firewall (optional).
 void setFirewallPassword(java.lang.String firewallPassword)
          A password if authentication is to be used connecting through the firewall.
 void setFirewallPort(int firewallPort)
          Port of the firewall to connect to.
 void setFirewallType(int firewallType)
          Determines the type of firewall to connect through.
 void setFirewallUser(java.lang.String firewallUser)
          A user name if authentication is to be used connecting through a firewall.
 void setKeepAlive(boolean keepAlive)
          When True, KEEPALIVE packets are enabled (for long connections).
 void setLinger(boolean linger)
          When set to True, connections are terminated gracefully.
 void setLocalHost(java.lang.String localHost)
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 void setLocalPort(int localPort)
          The TCP port in the local host where IPPort binds.
 void setRemoteHost(java.lang.String remoteHost)
          The address of the remote host.
 void setRemotePort(int remotePort)
          The Telnet port in the remote host (default is 23).
 void setTimeout(int timeout)
          A timeout for the component.
 void setTransparent(boolean transparent)
          When True, Telnet command processing is disabled.
 void setUrgentData(byte[] urgentData)
          A string of data to be sent urgently (out-of-band) to the remote host.
 void setWillOption(int willOption)
          A single character Telnet option code to be sent to the server with the Telnet WILL command.
 void setWontOption(int wontOption)
          A single character Telnet option code to be sent to the server with the Telnet WONT command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fwNone

public static final int fwNone

fwTunnel

public static final int fwTunnel

fwSOCKS4

public static final int fwSOCKS4

fwSOCKS5

public static final int fwSOCKS5
Constructor Detail

Telnet

public Telnet()
Method Detail

isAcceptData

public boolean isAcceptData()
Enables or disables data reception (the DataIn event). Setting the property to False, temporarily disables data reception (and the DataIn event). Setting the property to True, reenables data reception.


setAcceptData

public void setAcceptData(boolean acceptData)
                   throws IPWorksException
Enables or disables data reception (the DataIn event). Setting the property to False, temporarily disables data reception (and the DataIn event). Setting the property to True, reenables data reception.


getBytesSent

public int getBytesSent()
The number of bytes actually sent after an assignment to DataToSend . The BytesSent property shows how many bytes were sent after the last assignment to DataToSend or UrgentData . Please check the DataToSend property for more information.


setCommand

public void setCommand(int command)
                throws IPWorksException
A single character Telnet command code to be sent to the server. Codes for Telnet commands and their meanings are defined in the Telnet RFCs. Here are some examples:
241 (NOP)
No operation.
242 (Data Mark)
The data stream portion of a Synch. This should always be accompanied by a TCP Urgent notification.
243 (Break)
NVT character BRK.
244 (Interrupt Process)
The function IP.
245 (Abort Output)
The function AO.
246 (Are You There)
The function AYT.
247 (Erase Character)
The function EC.
248 (Erase Line)
The function EL.
249 (Go Ahead)
The GA signal.


isConnected

public boolean isConnected()
Triggers a connection or disconnection. Action property. Setting the Connected property to True makes the control attempt to connect to the host identified by the RemoteHost property. If successful, after the connection is achieved, the value of the property changes to True and the Connected event is fired.

Setting Connected to False closes the connection. How and when the connection is closed is controlled by the Linger property.


setConnected

public void setConnected(boolean connected)
                  throws IPWorksException
Triggers a connection or disconnection. Action property. Setting the Connected property to True makes the control attempt to connect to the host identified by the RemoteHost property. If successful, after the connection is achieved, the value of the property changes to True and the Connected event is fired.

Setting Connected to False closes the connection. How and when the connection is closed is controlled by the Linger property.


setDataToSend

public void setDataToSend(byte[] dataToSend)
                   throws IPWorksException
A string of data to be sent to the remote host. The DataToSend property is an action property. Assigning a string to this property makes the control send the string to the remote host .

If you are sending data to the remote host faster than it can process it, or faster than the network's bandwidth allows, the outgoing queue might fill up. When this happens, DataToSend If 0 bytes were sent, then you can wait for the ReadyToSend event before attempting to send data again. (However, please note that ReadyToSend is not fired when part of the data is successfully sent).


setDontOption

public void setDontOption(int dontOption)
                   throws IPWorksException
A single character Telnet option code to be sent to the server with the Telnet DONT command. Please look at the Telnet RFCs for a list of valid Telnet option codes and their descriptions. A few examples are:
0 (TRANSMIT-BINARY)
Enables or disables binary (8 bit) transmission.
1 (ECHO)
Telnet ECHO option. Specifies whether characters should be echoed or not.
3 (SUPPRESS-GO-AHEAD)
Used to enable or disable transmission of the Telnet GO_AHEAD command.
24 (TERMINAL-TYPE)
Allows or disallows terminal type negotiation.
31 (NAWS)
Allows or disallows window size negotiation.


setDoOption

public void setDoOption(int doOption)
                 throws IPWorksException
A single character Telnet option code to be sent to the server with the Telnet DO command. Please look at the Telnet RFCs for a list of valid Telnet option codes and their descriptions. A few examples are:
0 (TRANSMIT-BINARY)
Enables or disables binary (8 bit) transmission.
1 (ECHO)
Telnet ECHO option. Specifies whether characters should be echoed or not.
3 (SUPPRESS-GO-AHEAD)
Used to enable or disable transmission of the Telnet GO_AHEAD command.
24 (TERMINAL-TYPE)
Allows or disallows terminal type negotiation.
31 (NAWS)
Allows or disallows window size negotiation.


setDoSubOption

public void setDoSubOption(byte[] doSubOption)
                    throws IPWorksException
A Telnet suboption to send to the server with the suboption command. For a list of valid Telnet suboptions and their descriptions please look at the Telnet RFCs.

You don't need to specify the suboption start and suboption end codes. Those are appended automatically by the control. For example, to send a terminal type suboption to request setting the terminal type to 'vt100', you must send ASCII 24, followed by ASCII 0, followed by "vt100" (without the quotes).


getFirewallData

public byte[] getFirewallData()
Used to send other data to firewall. When the firewall is a tunneling proxy, use this property to to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).


setFirewallData

public void setFirewallData(byte[] firewallData)
                     throws IPWorksException
Used to send other data to firewall. When the firewall is a tunneling proxy, use this property to to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).


getFirewallHost

public java.lang.String getFirewallHost()
Name or IP address of firewall (optional). If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated and upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.


setFirewallHost

public void setFirewallHost(java.lang.String firewallHost)
                     throws IPWorksException
Name or IP address of firewall (optional). If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.

If the FirewallHost property is set to a Domain Name, a DNS request is initiated and upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the search is not successful, an error is returned.


getFirewallPassword

public java.lang.String getFirewallPassword()
A password if authentication is to be used connecting through the firewall. if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallPassword

public void setFirewallPassword(java.lang.String firewallPassword)
                         throws IPWorksException
A password if authentication is to be used connecting through the firewall. if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


getFirewallPort

public int getFirewallPort()
Port of the firewall to connect to. The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.


setFirewallPort

public void setFirewallPort(int firewallPort)
                     throws IPWorksException
Port of the firewall to connect to. The TCP port for the FirewallHost . See the description of the FirewallHost property for details.

Note that the FirewallPort is set automatically when FirewallType is set to a valid value. See the description of the FirewallType property for details.


getFirewallType

public int getFirewallType()
Determines the type of firewall to connect through. The applicable values are the following:
fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.


setFirewallType

public void setFirewallType(int firewallType)
                     throws IPWorksException
Determines the type of firewall to connect through. The applicable values are the following:
fwNone (0)
No firewall (default setting).
fwTunnel (1)
Connect through a tunneling proxy. FirewallPort is set to 80.
fwSOCKS4 (2)
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
fwSOCKS5 (3)
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.


getFirewallUser

public java.lang.String getFirewallUser()
A user name if authentication is to be used connecting through a firewall. if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


setFirewallUser

public void setFirewallUser(java.lang.String firewallUser)
                     throws IPWorksException
A user name if authentication is to be used connecting through a firewall. if FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.


isKeepAlive

public boolean isKeepAlive()
When True, KEEPALIVE packets are enabled (for long connections). The KeepAlive enables the SO_KEEPALIVE option on the socket. This option prevents long connections from timing out in case of inactivity.

Please note that Winsock implementations are not required to support SO_KEEPALIVE.


setKeepAlive

public void setKeepAlive(boolean keepAlive)
                  throws IPWorksException
When True, KEEPALIVE packets are enabled (for long connections). The KeepAlive enables the SO_KEEPALIVE option on the socket. This option prevents long connections from timing out in case of inactivity.

Please note that Winsock implementations are not required to support SO_KEEPALIVE.


isLinger

public boolean isLinger()
When set to True, connections are terminated gracefully. The Linger property controls how a connection is closed. The default is True. In this case the connection is closed only after all the data is sent. Setting it to False forces an abrupt (hard) disconnection. Any data that were in the sending queue may be lost.

The default behavior (which is also the default mode for Winsock stream sockets) might result in an indefinite delay in closing the connection. Although the control returns control immediately, Winsock might indefinitely hold system resources until all pending data are sent (even after your application closes). This means that valuable system resources might be wasted.

Setting Linger to False forces an immediate disconnection. If you know that the other side has received all the data you had sent (by a client acknowledgment, for example), setting Linger to False might be the appropriate course of action.


setLinger

public void setLinger(boolean linger)
               throws IPWorksException
When set to True, connections are terminated gracefully. The Linger property controls how a connection is closed. The default is True. In this case the connection is closed only after all the data is sent. Setting it to False forces an abrupt (hard) disconnection. Any data that were in the sending queue may be lost.

The default behavior (which is also the default mode for Winsock stream sockets) might result in an indefinite delay in closing the connection. Although the control returns control immediately, Winsock might indefinitely hold system resources until all pending data are sent (even after your application closes). This means that valuable system resources might be wasted.

Setting Linger to False forces an immediate disconnection. If you know that the other side has received all the data you had sent (by a client acknowledgment, for example), setting Linger to False might be the appropriate course of action.


getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. The LocalHost property contains the name of the local host as obtained by the gethostname() Winsock call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the control initiate connections (or accept in the case of server controls) only through that interface.

If the control is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. The LocalHost property contains the name of the local host as obtained by the gethostname() Winsock call, or if the user has assigned an IP address, the value of that address.

In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the control initiate connections (or accept in the case of server controls) only through that interface.

If the control is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


getLocalPort

public int getLocalPort()
The TCP port in the local host where IPPort binds. The LocalPort property must be set before a connection is attempted. It instructs the control to bind to a specific port (or communication endpoint) in the local machine.

Setting it to 0 (default) enables Winsock to choose a port at random. The chosen port will be shown by the LocalPort property after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set the LocalPort property when a connection is active will generate an error.

The LocalPort property is useful when trying to connect to services that require a trusted port in the client side.


setLocalPort

public void setLocalPort(int localPort)
                  throws IPWorksException
The TCP port in the local host where IPPort binds. The LocalPort property must be set before a connection is attempted. It instructs the control to bind to a specific port (or communication endpoint) in the local machine.

Setting it to 0 (default) enables Winsock to choose a port at random. The chosen port will be shown by the LocalPort property after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set the LocalPort property when a connection is active will generate an error.

The LocalPort property is useful when trying to connect to services that require a trusted port in the client side.


getRemoteHost

public java.lang.String getRemoteHost()
The address of the remote host. Domain names are resolved to IP addresses. The RemoteHost property specifies the IP address (IP number in dotted internet format) or Domain Name of the remote host. It is set before a connection is attempted and cannot be changed once a connection is established.

If the RemoteHost property is set to a Domain Name, a DNS request is initiated, and upon successful termination of the request, the RemoteHost property is set to the corresponding address. If the search is not successful, an error is returned.


setRemoteHost

public void setRemoteHost(java.lang.String remoteHost)
                   throws IPWorksException
The address of the remote host. Domain names are resolved to IP addresses. The RemoteHost property specifies the IP address (IP number in dotted internet format) or Domain Name of the remote host. It is set before a connection is attempted and cannot be changed once a connection is established.

If the RemoteHost property is set to a Domain Name, a DNS request is initiated, and upon successful termination of the request, the RemoteHost property is set to the corresponding address. If the search is not successful, an error is returned.


getRemotePort

public int getRemotePort()
The Telnet port in the remote host (default is 23). A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed while a connection is in progress. Any attempt to change the RemotePort while connected will fail with an error.


setRemotePort

public void setRemotePort(int remotePort)
                   throws IPWorksException
The Telnet port in the remote host (default is 23). A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed while a connection is in progress. Any attempt to change the RemotePort while connected will fail with an error.


getTimeout

public int getTimeout()
A timeout for the component. If the Timeout property is set to 0 (default value), all operations return immediately, potentially failing with an 'WOULDBLOCK' error if they can't be completed..

If Timeout is set to a positive value, the control will automatically retry each operation that would otherwise result in a 'WOULDBLOCK' error for a maximum of Timeout seconds.

The control will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If the Timeout expires, and the operation is not yet complete, a Timeout error is fired.


setTimeout

public void setTimeout(int timeout)
                throws IPWorksException
A timeout for the component. If the Timeout property is set to 0 (default value), all operations return immediately, potentially failing with an 'WOULDBLOCK' error if they can't be completed..

If Timeout is set to a positive value, the control will automatically retry each operation that would otherwise result in a 'WOULDBLOCK' error for a maximum of Timeout seconds.

The control will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If the Timeout expires, and the operation is not yet complete, a Timeout error is fired.


isTransparent

public boolean isTransparent()
When True, Telnet command processing is disabled. The Transparent property allows you to enable or disable Telnet command processing. When command processing is disabled, any data received are provided with no modifications.


setTransparent

public void setTransparent(boolean transparent)
                    throws IPWorksException
When True, Telnet command processing is disabled. The Transparent property allows you to enable or disable Telnet command processing. When command processing is disabled, any data received are provided with no modifications.


setUrgentData

public void setUrgentData(byte[] urgentData)
                   throws IPWorksException
A string of data to be sent urgently (out-of-band) to the remote host. The UrgentData property behaves exactly like the DataToSend property except that the data are sent Out Of Band (urgent). This means that the data assigned to UrgentData will bypass the normal TCP queuing mechanism. Use this property with caution.


setWillOption

public void setWillOption(int willOption)
                   throws IPWorksException
A single character Telnet option code to be sent to the server with the Telnet WILL command. Please look at the Telnet RFCs for a list of valid Telnet option codes and their descriptions. A few examples are:
0 (TRANSMIT-BINARY)
Enables or disables binary (8 bit) transmission.
1 (ECHO)
Telnet ECHO option. Specifies whether characters should be echoed or not.
3 (SUPPRESS-GO-AHEAD)
Used to enable or disable transmission of the Telnet GO_AHEAD command.
24 (TERMINAL-TYPE)
Allows or disallows terminal type negotiation.
31 (NAWS)
Allows or disallows window size negotiation.


setWontOption

public void setWontOption(int wontOption)
                   throws IPWorksException
A single character Telnet option code to be sent to the server with the Telnet WONT command. Please look at the Telnet RFCs for a list of valid Telnet option codes and their descriptions. A few examples are:
0 (TRANSMIT-BINARY)
Enables or disables binary (8 bit) transmission.
1 (ECHO)
Telnet ECHO option. Specifies whether characters should be echoed or not.
3 (SUPPRESS-GO-AHEAD)
Used to enable or disable transmission of the Telnet GO_AHEAD command.
24 (TERMINAL-TYPE)
Allows or disallows terminal type negotiation.
31 (NAWS)
Allows or disallows window size negotiation.


fireCommand

public void fireCommand(int commandCode)
Fired when a Telnet command comes from the Telnet server. (Called internally to dispatch the event.)
See Also:
TelnetCommandEvent

fireConnected

public void fireConnected(int statusCode,
                          java.lang.String description)
Fired immediately after a connection completes (or fails). (Called internally to dispatch the event.)
See Also:
TelnetConnectedEvent

fireDataIn

public void fireDataIn(byte[] text)
Fired when characters are received from the remote host. (Called internally to dispatch the event.)
See Also:
TelnetDataInEvent

fireDisconnected

public void fireDisconnected(int statusCode,
                             java.lang.String description)
Fired when a connection is closed. (Called internally to dispatch the event.)
See Also:
TelnetDisconnectedEvent

fireDoDo

public void fireDoDo(int optionCode)
Fired when a Telnet DO OPTION command comes from the Telnet server. (Called internally to dispatch the event.)
See Also:
TelnetDoDoEvent

fireDont

public void fireDont(int optionCode)
Fired when a Telnet DONT OPTION command comes from the Telnet server. (Called internally to dispatch the event.)
See Also:
TelnetDontEvent

fireError

public void fireError(int errorCode,
                      java.lang.String description)
Information about errors during data delivery. (Called internally to dispatch the event.)
See Also:
TelnetErrorEvent

fireReadyToSend

public void fireReadyToSend()
Fired when the component is ready to send data. (Called internally to dispatch the event.)
See Also:
TelnetReadyToSendEvent

fireSubOption

public void fireSubOption(byte[] subOption)
Fired when a Telnet suboption command comes from the Telnet server. (Called internally to dispatch the event.)
See Also:
TelnetSubOptionEvent

fireWill

public void fireWill(int optionCode)
Fired when a Telnet WILL OPTION command comes from the Telnet server. (Called internally to dispatch the event.)
See Also:
TelnetWillEvent

fireWont

public void fireWont(int optionCode)
Fired when a Telnet WONT OPTION command comes from the Telnet server. (Called internally to dispatch the event.)
See Also:
TelnetWontEvent

connect

public void connect(java.lang.String host)
             throws IPWorksException
Connect to a remote host. Calling this method is equivalent to setting the RemoteHost property to Host and then setting the Connected property to True.


disconnect

public void disconnect()
                throws IPWorksException
Disconnect from the remote host. Calling this method is equivalent to setting the Connected property to False.


send

public void send(byte[] text)
          throws IPWorksException
Send data to the remote host. Calling this method is equivalent to setting the DataToSend property to Text .


addTelnetEventListener

public void addTelnetEventListener(TelnetEventListener l)
                            throws java.util.TooManyListenersException

removeTelnetEventListener

public void removeTelnetEventListener(TelnetEventListener l)

IP*Works!

Copyright (c) 2001 /n software inc. - All rights reserved.