From 589e6c881bd2cf11e8615e9c1bf8cb4012293bad Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 31 Dec 2015 03:34:08 +0100 Subject: libraries/oscP5: Adding oscP5 library for OSC capabilities. --- .../oscP5/reference/netP5/AbstractTcpServer.html | 675 +++++++++++++++++++++ 1 file changed, 675 insertions(+) create mode 100644 libraries/oscP5/reference/netP5/AbstractTcpServer.html (limited to 'libraries/oscP5/reference/netP5/AbstractTcpServer.html') diff --git a/libraries/oscP5/reference/netP5/AbstractTcpServer.html b/libraries/oscP5/reference/netP5/AbstractTcpServer.html new file mode 100644 index 0000000..cd55883 --- /dev/null +++ b/libraries/oscP5/reference/netP5/AbstractTcpServer.html @@ -0,0 +1,675 @@ + + + + + + +AbstractTcpServer (Javadocs: oscP5) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +netP5 +
+Class AbstractTcpServer

+
+java.lang.Object
+  extended by netP5.AbstractTcpServer
+
+
+
All Implemented Interfaces:
Runnable, TcpPacketListener
+
+
+
Direct Known Subclasses:
TcpServer
+
+
+
+
public abstract class AbstractTcpServer
extends Object
implements Runnable, TcpPacketListener
+ + +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intMODE_NEWLINE + +
+           
+static intMODE_READLINE + +
+           
+static intMODE_STREAM + +
+           
+static intMODE_TERMINATED + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
AbstractTcpServer(int thePort, + int theMode) + +
+           
AbstractTcpServer(TcpPacketListener theTcpPacketListener, + int thePort, + int theMode) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidban(String theIP) + +
+          ban an IP address from the server.
+ voiddispose() + +
+          kill the server.
+ TcpClientgetClient(int theIndex) + +
+          get a client at a specific position the client list.
+ TcpClient[]getClients() + +
+          get a list of all connected clients.
+abstract  voidhandleInput(TcpPacket thePacket, + int thePort) + +
+           
+ voidprocess(TcpPacket thePacket, + int thePort) + +
+           
+ voidremove(AbstractTcpClient theTcpClient) + +
+          remove a TcpClient from the server's client list.
+ voidrun() + +
+           
+ voidsend(byte[] theBytes) + +
+          send a byte array to the connected client(s).
+ voidsend(String theString) + +
+          send a string to the connected client(s).
+ intsize() + +
+          get the number of connected clients.
+ ServerSocketsocket() + +
+          get the server socket object.
+ voidunBan(String theIP) + +
+          remove the ban for an IP address.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface netP5.TcpPacketListener
status
+  +

+ + + + + + + + +
+Field Detail
+ +

+MODE_READLINE

+
+public static final int MODE_READLINE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MODE_TERMINATED

+
+public static final int MODE_TERMINATED
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MODE_NEWLINE

+
+public static final int MODE_NEWLINE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MODE_STREAM

+
+public static final int MODE_STREAM
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+AbstractTcpServer

+
+public AbstractTcpServer(int thePort,
+                         int theMode)
+
+
+
Parameters:
thePort - int
theMode - int
+
+
+ +

+AbstractTcpServer

+
+public AbstractTcpServer(TcpPacketListener theTcpPacketListener,
+                         int thePort,
+                         int theMode)
+
+
+
Parameters:
theTcpPacketListener - TcpPacketListener
thePort - int
theMode - int
+
+ + + + + + + + +
+Method Detail
+ +

+ban

+
+public void ban(String theIP)
+
+
ban an IP address from the server. +

+

+
+
+
+
Parameters:
theIP -
+
+
+
+ +

+unBan

+
+public void unBan(String theIP)
+
+
remove the ban for an IP address. +

+

+
+
+
+
Parameters:
theIP -
+
+
+
+ +

+socket

+
+public ServerSocket socket()
+
+
get the server socket object. more at java.net.ServerSocket +

+

+
+
+
+ +
Returns:
+
+
+
+ +

+run

+
+public void run()
+
+
+
Specified by:
run in interface Runnable
+
+
+
+
+
+
+ +

+send

+
+public void send(String theString)
+
+
send a string to the connected client(s). +

+

+
+
+
+
Parameters:
theString -
+
+
+
+ +

+send

+
+public void send(byte[] theBytes)
+
+
send a byte array to the connected client(s). +

+

+
+
+
+
Parameters:
theBytes -
+
+
+
+ +

+dispose

+
+public void dispose()
+
+
kill the server. +

+

+
+
+
+
+
+
+
+ +

+size

+
+public int size()
+
+
get the number of connected clients. +

+

+
+
+
+ +
Returns:
+
+
+
+ +

+getClients

+
+public TcpClient[] getClients()
+
+
get a list of all connected clients. an array of type TcpClient[] + will be returned. +

+

+
+
+
+ +
Returns:
+
+
+
+ +

+getClient

+
+public TcpClient getClient(int theIndex)
+
+
get a client at a specific position the client list. +

+

+
+
+
+
Parameters:
theIndex - +
Returns:
+
+
+
+ +

+process

+
+public void process(TcpPacket thePacket,
+                    int thePort)
+
+
+
Specified by:
process in interface TcpPacketListener
+
+
+
Parameters:
thePacket - TcpPacket
thePort - int
+
+
+
+ +

+handleInput

+
+public abstract void handleInput(TcpPacket thePacket,
+                                 int thePort)
+
+
+
+
+
+
Parameters:
thePacket - TcpPacket
thePort - int
+
+
+
+ +

+remove

+
+public void remove(AbstractTcpClient theTcpClient)
+
+
remove a TcpClient from the server's client list. +

+

+
Specified by:
remove in interface TcpPacketListener
+
+
+
Parameters:
theTcpClient - TCPClientAbstract
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+processing library oscP5 by Andreas Schlegel. (c) 2004-2012 + + -- cgit v1.2.3-70-g09d2