|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.net.Socket
public class Socket
Socket. Allows a NXT to establish a connection with a remote Socket server via a proxy server. Version 1.1 uses NXTConnection and does not need to distinguish between USB and Bluetooth.
| Constructor Summary | |
|---|---|
Socket()
Constructor. |
|
Socket(String host,
int port)
Constructor: Pass an open NXT connection and socket details. |
|
| Method Summary | |
|---|---|
void |
close()
Write Escape sequence to indicate end of file |
InputStream |
getInputStream()
Returns the input stream associated with this socket |
OutputStream |
getOutputStream()
Returns the output stream associated with this socket |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Socket(String host,
int port)
throws IOException
host - The name of the host with which the socket will be openedport - The port to connect to
IOException - If the host does not respond or the proxy is
not runningpublic Socket()
| Method Detail |
|---|
public OutputStream getOutputStream()
throws IOException
IOException
public InputStream getInputStream()
throws IOException
IOExceptionpublic void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||