Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lejos.nxt.comm
Class NXTServerSocket

    java.lang.Object
      lejos.nxt.comm.NXTServerSocket

    public class NXTServerSocket

extends Object

Communicates with a ServerProxy on the PC to provide a ServerSocket interface applications on the NXT.

Constructor Summary
`NXTServerSocket(int port, BTConnection btc)` Constructor.
`NXTServerSocket(int port, USBConnection usbc)` Constructor.

Method Summary
`NXTSocket` | `accept()` Waits untill there is a socket connection available.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait`

Constructor Detail

### NXTServerSocket

    public NXTServerSocket(int port,
                           BTConnection btc)
                    throws IOException

  Constructor. Creates a new Server Socket over an open bluetooth connection

  Parameters:
    `port` - The port to listen on
    `btc` - The bluetooth connection to open
  Throws:
    `IOException`

### NXTServerSocket

    public NXTServerSocket(int port,
                           USBConnection usbc)
                    throws IOException

  Constructor. Creates a new Server Socket over an open usb connection

  Parameters:
    `port` - The port to listen on
    `usbc` - The usb connection to open
  Throws:
    `IOException`

Method Detail

### accept

    public NXTSocket accept()
                     throws IOException

  Waits untill there is a socket connection available. When this becomes true a new NXTSocket is returned

  Returns:
    NXTSocket
  Throws:
    `IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD