}
public static void main(String[] args) {
// create a new NeuroServerConnection
NeuroServerConnection connection = new NeuroServerConnection("localhost", 8336);
// register this class as listener
connection.addInputListener(new ExampleConnection());
// connect to NeuroServer
connection.connect();
// check if connection is connected
if(connection.isConnected()) {
// send hello command
connection.sendCommand(Command.HELLO);
}
// disconnect from NeuroServer
connection.disconnect();
}