class SocketNetwork implements CloseableNetwork {

  @Override
  public void send(int partyId, byte[] data) {
    if (partyId == conf.getMyId()) {
      this.selfQueue.add(data);
    } else {
      inRange(partyId);
      if (!senders.get(partyId).isRunning()) {
        throw new RuntimeException(
            "P" + conf.getMyId() + ": Unable to send to P" + partyId + ". Sender not running");
      }
      this.senders.get(partyId).queueMessage(data);
    }
  }

  public  SocketNetwork(NetworkConfiguration conf, Map<Integer, Socket> socketMap);
  public  SocketNetwork(NetworkConfiguration conf);

}