}
}
private static void send(IoSession session, Object object) throws InterruptedException, IOException {
WriteFuture writeFuture = session.write(object);
writeFuture.await(TIMEOUT);
if (!writeFuture.isWritten()) {
Throwable exception = writeFuture.getException();
if(exception!=null){
throw new IOException("Error occured while writing!", exception);
}