public class MultiplexerServerSocketController extends Object
Constructor and Description |
---|
MultiplexerServerSocketController()
Created by MultiplexerServer to manage a "real" serversocket, to accept client connections
created by MultiplexerClient.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(MultiplexerSocketController vsc)
Adds a new SocketController to list.
|
void |
close()
Close all client connections.
|
int |
getCreatedConnectionCount() |
String |
getInvalidConnectionMessage() |
int |
getLiveConnectionCount() |
long |
getReadCount() |
long |
getReadSize() |
VirtualServerSocket |
getServerSocket(String serverSocketName)
Create a new ServerSocket that will accept new client MultiplexerSockets through a multiplexed
connection.
|
protected MultiplexerSocketController[] |
getSocketControllers() |
int |
getThrottleLimit() |
long |
getWriteCount() |
long |
getWriteSize() |
protected void |
onAcceptRealClientConnection(Socket socket)
This is internally called when a new "real" client socket connection is accepted on the server.
|
void |
onClientConnect(Socket socket,
int connectionId) |
void |
onClientDisconnect(int connectionId) |
protected void |
remove(MultiplexerSocketController vsc)
Removes a SocketController from list.
|
void |
setInvalidConnectionMessage(String msg)
Message to display when a non-socket connects.
|
void |
setThrottleLimit(int mbPerSecond)
Used to set the limit on the number of bytes that can be written per second (in MB).
|
void |
start(ServerSocket ss) |
protected void |
timeoutConnections()
Used by Thread to check new connections to make sure that they are valid connections.
|
public MultiplexerServerSocketController()
public void setInvalidConnectionMessage(String msg)
public String getInvalidConnectionMessage()
public void start(ServerSocket ss)
public void setThrottleLimit(int mbPerSecond)
public int getThrottleLimit()
protected void onAcceptRealClientConnection(Socket socket) throws IOException
IOException
protected void timeoutConnections()
protected void add(MultiplexerSocketController vsc)
protected void remove(MultiplexerSocketController vsc)
protected MultiplexerSocketController[] getSocketControllers()
public VirtualServerSocket getServerSocket(String serverSocketName) throws IOException
IOException
public void onClientConnect(Socket socket, int connectionId)
public void onClientDisconnect(int connectionId)
public long getWriteCount()
public long getWriteSize()
public long getReadCount()
public long getReadSize()
public int getCreatedConnectionCount()
public int getLiveConnectionCount()
Copyright © 1999–2019 ViaOA. All rights reserved.