|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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(NXTConnection nxtc)
Constructor. |
|
Socket(String host,
int port,
NXTConnection nxtc)
Constructor: Pass an open NXT connection and socket details. |
Method Summary | |
---|---|
void |
close()
Write Escape sequence to indicate end of file |
DataInputStream |
getDataInputStream()
Returns the data input stream of the socket |
DataOutputStream |
getDataOutputStream()
Returns the data output stream of the socket |
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, NXTConnection nxtc) throws IOException
host
- The name of the host with which the socket will be openedport
- The port to connect tonxtc
- The NXT connection
IOException
- If the host does not respond or the proxy is
not runningpublic Socket(NXTConnection nxtc)
nxtc
- the connection the socket is made overMethod Detail |
---|
public DataInputStream getDataInputStream() throws IOException
IOException
public DataOutputStream getDataOutputStream() throws IOException
IOException
public OutputStream getOutputStream() throws IOException
IOException
public InputStream getInputStream() throws IOException
IOException
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |