return active;
}
@Override
public void run() {
ONetworkProtocol protocol;
OClientConnection connection;
try {
while (active) {
try {
// listen for and accept a client connection to serverSocket
Socket socket = serverSocket.accept();
socket.setPerformancePreferences(0, 2, 1);
socket.setSendBufferSize(socketBufferSize);
socket.setReceiveBufferSize(socketBufferSize);
// CREATE A NEW PROTOCOL INSTANCE
protocol = protocolType.newInstance();
// CREATE THE CLIENT CONNECTION
connection = OClientConnectionManager.instance().connect(socket, protocol);
// CONFIGURE THE PROTOCOL FOR THE INCOMING CONNECTION
protocol.config(server, socket, connection, configuration);
if (commands != null)
// REGISTER ADDITIONAL COMMANDS
for (OServerCommand c : commands) {
protocol.registerCommand(c);
}
} catch (Throwable e) {
OLogManager.instance().error(this, "Error on client connection", e);
} finally {