public abstract class LXSocket extends LXBufferOutput implements LXOutput.InetOutput
LXBufferOutput.ByteOrder
LXOutput.GammaMode, LXOutput.InetOutput
LXComponent.Placeholder, LXComponent.Renamable
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CONNECT_TIMEOUT_MS |
protected OutputStream |
output |
protected Socket |
socket |
byteOrder, byteOrderBuffer, indexBuffer
brightness, enabled, framesPerSecond, gamma, gammaMode
controlSurfaceSemaphore, KEY_CLASS, KEY_COMPONENT_ID, KEY_ID, KEY_PARAMETER_PATH, KEY_PATH, label, lx, modulationColor
NO_PORT
Modifier | Constructor and Description |
---|---|
protected |
LXSocket(LX lx,
int[] indexBuffer) |
protected |
LXSocket(LX lx,
int[] indexBuffer,
LXBufferOutput.ByteOrder byteOrder) |
Modifier and Type | Method and Description |
---|---|
protected void |
didConnect()
Subclasses may override to take additional actions upon successful connection
|
protected void |
didDisconnect(Exception x)
Subclasses may override to take additional actions upon disconnection
|
protected void |
disconnect(Exception x) |
InetAddress |
getAddress() |
protected byte[] |
getPacketData(int[] colors,
byte[] glut) |
int |
getPort() |
boolean |
isConnected() |
protected void |
onSend(int[] colors,
byte[] glut)
Subclasses implement this to send the data.
|
LXSocket |
setAddress(InetAddress address) |
LXSocket |
setConnectTimeout(int connectTimeoutMs) |
LXSocket |
setPort(int port) |
getDataBuffer, getDataBufferOffset, setByteOrder, setByteOrder, updateDataBuffer, updateIndexBuffer
error, error, getGammaLut, log, onParameterChanged, onSend, send, send, setGammaDelegate, setGroup
addArray, addChild, addInternalParameter, addParameter, addParameter, contains, copyParameters, dispose, getChild, getComponentName, getComponentName, getComponentName, getId, getLabel, getLX, getOscAddress, getOscLabel, getOscPath, getParameter, getParameters, getParent, getPath, handleOscMessage, load, loadParameters, removeParameter, removeParameter, save, saveParameters, setParent, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, get, getCanonicalLabel, getCanonicalLabel, getCanonicalPath, getCanonicalPath, getComponent, getComponent, getParameter, getParameter
public static final int DEFAULT_CONNECT_TIMEOUT_MS
protected Socket socket
protected OutputStream output
protected LXSocket(LX lx, int[] indexBuffer)
protected LXSocket(LX lx, int[] indexBuffer, LXBufferOutput.ByteOrder byteOrder)
public LXSocket setConnectTimeout(int connectTimeoutMs)
public LXSocket setAddress(InetAddress address)
setAddress
in interface LXOutput.InetOutput
public InetAddress getAddress()
getAddress
in interface LXOutput.InetOutput
public LXSocket setPort(int port)
setPort
in interface LXOutput.InetOutput
public int getPort()
getPort
in interface LXOutput.InetOutput
public boolean isConnected()
protected void didConnect()
protected void disconnect(Exception x)
protected void didDisconnect(Exception x)
x
- Exception that caused the disconnect if there was oneprotected void onSend(int[] colors, byte[] glut)
LXOutput
protected byte[] getPacketData(int[] colors, byte[] glut)
LX library by Mark C. Slee. © 2012-2020