|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.nxt.comm.NXTSocket
public class NXTSocket
NXTSocket. Allows a NXT to establish a connection with a remote Socket server via a proxy server.
| Constructor Summary | |
|---|---|
NXTSocket(BTConnection btc)
Constructor. |
|
NXTSocket(String host,
int port,
BTConnection btc)
Constructor: Pass an open bluetooth connection and socket details. |
|
NXTSocket(String host,
int port,
USBConnection usbc)
Constructor: Pass an open USB connection and socket details. |
|
NXTSocket(USBConnection usbc)
Constructor for usb connnection. |
|
| Method Summary | |
|---|---|
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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
| Constructor Detail |
|---|
public NXTSocket(String host,
int port,
BTConnection btc)
throws IOException
host - The name of the host with which the socket will be openedport - The port to connect tobtc - The bluetooth connection
IOException - If the bluetooth does not respond or the proxy is
not running
public NXTSocket(String host,
int port,
USBConnection usbc)
throws IOException
host - The name of the host with which the socket will be openedport - The port to connect tousbc - The USB connection
IOException - If the bluetooth does not respond or the proxy is
not runningpublic NXTSocket(BTConnection btc)
btc - the connection the socket is made overpublic NXTSocket(USBConnection usbc)
usbc - The USB connection to use;| Method 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||