boolean sendFrame(final ProtocolFrame frame) { logFrame(frame, true); try { final byte[] packed = frame.pack(); synchronized (mySocketObject) { final OutputStream os = mySocket.getOutputStream(); os.write(packed); os.flush(); return true; } } catch (SocketException se) { disconnect(); fireCommunicationError(); } catch (IOException e) { LOG.error(e); } return false; }