/** * send buffer without using the asynchronous * calls to selector and then close the socket * @param bb */ void sendBufferSync(ByteBuffer bb) { try { /* configure socket to be blocking * so that we dont have to do write in * a tight while loop */ if (bb != ServerCnxnFactory.closeConn) { if (sock.isOpen()) { sock.configureBlocking(true); sock.write(bb); } packetSent(); } } catch (IOException ie) { LOG.error("Error sending data synchronously ", ie); } }
/** * send buffer without using the asynchronous * calls to selector and then close the socket * @param bb */ void sendBufferSync(ByteBuffer bb) { try { /* configure socket to be blocking * so that we dont have to do write in * a tight while loop */ sock.configureBlocking(true); if (bb != ServerCnxnFactory.closeConn) { if (sock.isOpen()) { sock.write(bb); } packetSent(); } } catch (IOException ie) { LOG.error("Error sending data synchronously ", ie); } }
/** * send buffer without using the asynchronous * calls to selector and then close the socket * @param bb */ void sendBufferSync(ByteBuffer bb) { try { /* configure socket to be blocking * so that we dont have to do write in * a tight while loop */ sock.configureBlocking(true); if (bb != closeConn) { if (sock != null) { sock.write(bb); } packetSent(); } } catch (IOException ie) { LOG.error("Error sending data synchronously ", ie); } }