public class SocketCom
extends java.lang.Object
Constructor and Description |
---|
SocketCom() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect(java.lang.String host,
int port)
Connect a socket to the given host and port.
|
java.lang.String |
receiveMessage()
Returns the last line in buffer.
|
void |
sendMessage(java.lang.String text)
Sends a string message through socket connection.
|
public void connect(java.lang.String host, int port)
host
- port
- public void sendMessage(java.lang.String text)
text
- public java.lang.String receiveMessage()
public void close()