// get the custom server
CustomServer lCS0 = (CustomServer) JWebSocketFactory.getServer("cs0");
if (lCS0 != null) {
// and add the sample listener to the server's listener chain
lCS0.addListener(new JWebSocketCustomListenerSample());
}
// remain here until shut down request
while (JWebSocketInstance.getStatus() != JWebSocketInstance.SHUTTING_DOWN) {
try {