Control Surface API  1.1.11
RemoteConnection Interface Reference

Public Member Functions

void disconnect ()
void setDisconnectCallback (Callable callback)
void setReceiveCallback (Callable callback)
void send (byte[] data) throws IOException

Detailed Description

Instances of this interface are reported to the supplied script callback when connecting to a remote TCP socket via Host#connectToRemoteHost.

See also:
Host#connectToRemoteHost
Since:
Bitwig Studio 1.0

Definition at line 14 of file RemoteConnection.java.


Member Function Documentation

void disconnect ( )

Disconnects from the remote host.

Since:
Bitwig Studio 1.0
void send ( byte[]  data) throws IOException

Sends data to the remote host.

Parameters:
datathe byte array containing the data to be sent. When creating a numeric byte array in JavaScript, the byte values must be signed (in the range -128..127).
Exceptions:
IOException
Since:
Bitwig Studio 1.0
void setDisconnectCallback ( Callable  callback)

Registers a callback function that gets called when the connection gets lost or disconnected.

Parameters:
callbacka callback function that doesn't receive any parameters
Since:
Bitwig Studio 1.0
void setReceiveCallback ( Callable  callback)

Sets the callback used for receiving data.

The remote connection needs a header for each message sent to it containing a 32-bit big-endian integer saying how big the rest of the message is. The data delivered to the script will not include this header.

Parameters:
callbacka callback function with the signature `(byte[] data)`
Since:
Bitwig Studio 1.0

List of all members.


The documentation for this interface was generated from the following file:
 All Classes Functions Variables