|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.msi.network.connection.clientTCPConnection
Describe class clientTCPConnection here.
| Field Summary | |
private java.net.Socket |
_cSock
|
private java.io.InputStream |
_in
|
private java.io.OutputStream |
_out
|
(package private) java.net.InetAddress |
destination
|
(package private) int |
port
|
| Constructor Summary | |
clientTCPConnection(java.net.InetAddress dst,
int port)
Opens a connection to the specified system and port combination. |
|
| Method Summary | |
void |
close()
Close out the connection to the server and free any system resources. |
protected void |
finalize()
Make sure we close the connection if anything bad happens. |
java.lang.String |
getLine()
Gets a line of output from the TCP/IP server. |
int |
getServerPort()
Return the server port associated with this connection. |
void |
putLine(java.lang.String line)
Send a line to the server. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.net.InetAddress destination
int port
private java.net.Socket _cSock
private java.io.InputStream _in
private java.io.OutputStream _out
| Constructor Detail |
public clientTCPConnection(java.net.InetAddress dst,
int port)
throws java.lang.Exception
dst - an InetAddress valueport - an int value
java.lang.Exception - if an error occurs| Method Detail |
public java.lang.String getLine()
throws java.lang.Exception
Sometimes it is possible to 'outrun' the remote server or the intervening network. A brief delay is provided to overcome this temporary and often initial, buffer-empty condition.
getLine in interface clientConnectionjava.lang.Exception - if an error occurspublic void putLine(java.lang.String line)
putLine in interface clientConnectionline - to send.public void close()
close in interface clientConnection
protected void finalize()
throws java.lang.Throwable
java.lang.Throwable - if an error occurspublic int getServerPort()
getServerPort in interface clientConnection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||