class InfluxDbTcpSender extends InfluxDbBaseSender {

    @Override
    protected int writeData(byte[] line) throws Exception {
        retryConnect(false);

        for (int i = 1; i <= NUM_OF_RETRIES; i++) {
            try {
                OutputStream outputStream = tcpSocket.getOutputStream();
                outputStream.write(line);
                outputStream.flush();

                return 0;
            } catch (IOException e) {
                // In case of exception, force reconnect
                retryConnect(true);
            }
        }

        return 0;
    }

    public  InfluxDbTcpSender(
        final String hostname,
        final int port,
        final int socketTimeout,
        final String database,
        final String measurementPrefix);

}