|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrb5.util.TCPClient
public class TCPClient
Class Description : TCPClient instantiates a TCP Client. A modified version of the code obtained from the Open Group Research Institute.
Constructor Summary | |
---|---|
TCPClient(java.net.InetAddress iaddr,
int port)
Class constructor specifying the ip address and the port. |
|
TCPClient(java.net.Socket sock)
Class constructor specifying the socket. |
|
TCPClient(java.lang.String hostname,
int port)
Class constructor specifying the host name and the port. |
Method Summary | |
---|---|
void |
close()
Closes the connection |
java.net.InetAddress |
getInetAddress()
Gets the inet address |
byte[] |
receive()
Receives an array of bytes |
void |
send(byte[] data)
Sends an array of bytes |
void |
setBufSize(int newBufSize)
Sets the buffer size. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TCPClient(java.net.InetAddress iaddr, int port) throws java.io.IOException
iaddr
- is of type InetAddressport
- is of type int
java.io.IOException
- an exceptionInetAddress
,
IOException
public TCPClient(java.lang.String hostname, int port) throws java.io.IOException
hostname
- is of type Stringport
- is of type int
java.io.IOException
- an exceptionIOException
public TCPClient(java.net.Socket sock) throws java.io.IOException
sock
- is of type Socket
java.io.IOException
- an exceptionSocket
,
IOException
Method Detail |
---|
public void setBufSize(int newBufSize)
newBufSize
- is of type intpublic java.net.InetAddress getInetAddress()
InetAddress
public void send(byte[] data) throws java.io.IOException
data
- is of type byte[]
java.io.IOException
- an exceptionIOException
public byte[] receive() throws java.io.IOException
java.io.IOException
- an exceptionIOException
public void close() throws java.io.IOException
java.io.IOException
- an exceptionIOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |