code: private void send(final byte[] buffer, final Session destination) {
          synchronized (connections) {
              // execute asynchronously to avoid slower clients from interfering with faster clients
              final ExecutorService connectionThread = connectionThreads.get(destination);
              if (connectionThread == null) {
                  // Maybe the client has disconnected in the mean time.
                  return;
              }
              connectionThread.execute(new Runnable() {
                  @Override
                  public void run() {
                      try {
                          // for the case that the runnable was committed shortly before the connection was closed.
                          if (destination.isOpen()) {
                              // FIXME replace with getAsyncRemote and removeconnectionThreads as soon as
                              // getAsyncRemote on tomcat is thread-safe
                              destination.getBasicRemote().sendBinary(ByteBuffer.wrap(buffer));
                          }
                      } catch (final IOException e) {
                          try {
                              if (destination.isOpen()) {
                                  destination.close(new CloseReason(CloseCodes.PROTOCOL_ERROR, "Failed to send data."));
                              }
                          } catch (final IOException e1) {
                              // The outer exception already indicated that something went wrong.
                              ignore(e1);
                          }
                          handleClientError(destination, e);
                          connectionCloses(destination);
                      }
                  }
              });
          }
      }
docs: Sends send the result of {@link Serializer#serialize(List)} to a destination.
  
  @param buffer the bytes to send.
  @param destination The peer to send to.