<commit_before>package nanomsg;

import nanomsg.exceptions.IOException;

/**
 * Common interface that should implement all sockets.
 */
public interface ISocket {
  public void close() throws IOException;
  public int getNativeSocket();
  public void bind(final String dir) throws IOException;
  public void connect(final String dir) throws IOException;
  public void subscribe(final String data) throws IOException;
  public void subscribe(final byte[] data) throws IOException;

  public int sendString(final String data, final boolean blocking) throws IOException, IOException;
  public int sendString(final String data) throws IOException, IOException;
  public int sendBytes(final byte[] data, final boolean blocking) throws IOException, IOException;
  public int sendBytes(final byte[] data) throws IOException, IOException;

  public String recvString(final boolean blocking) throws IOException, IOException;
  public String recvString() throws IOException, IOException;

  public byte[] recvBytes(final boolean blocking) throws IOException, IOException;
  public byte[] recvBytes() throws IOException, IOException;

  public int getFd(final int flag) throws IOException;

  public void setSendTimeout(final int milis);
  public void setRecvTimeout(final int milis);
}<commit_msg>Simplify ISocket interface.<commit_after>package nanomsg;

import nanomsg.exceptions.IOException;

/**
 * Common interface that should implement all sockets.
 */
public interface ISocket {
  public int getNativeSocket();

  public void close() throws IOException;
  public void bind(final String dir) throws IOException;
  public void connect(final String dir) throws IOException;

  public int send(final String data, final boolean blocking) throws IOException;
  public int send(final String data) throws IOException;
  public int send(final byte[] data, final boolean blocking) throws IOException;
  public int send(final byte[] data) throws IOException;
  public int send(final IMessage data, final boolean blocking) throws IOException;
  public int send(final IMessage data) throws IOException;

  public String recvString(final boolean blocking) throws IOException;
  public String recvString() throws IOException;

  public byte[] recvBytes(final boolean blocking) throws IOException;
  public byte[] recvBytes() throws IOException;

  public IMessage recv(final boolean blocking) throws IOException;
  public IMessage recv() throws IOException;

  // public int getFd(final int flag) throws IOException;

  public void setSendTimeout(final int milis);
  public void setRecvTimeout(final int milis);
}
{'fraction_non_alphanumeric': 0.06705202312138728, 'fraction_numerical': 0.0, 'mean_word_length': 5.656410256410257, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7531959', 'n_tokens_mistral': 626, 'n_tokens_neox': 606, 'n_words': 275}