Skip to content
Snippets Groups Projects
Commit e853e503 authored by Florian Fittkau's avatar Florian Fittkau
Browse files

working on tcp connector

parent a1a34847
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ public class TCPConnector extends AbstractSink implements IWriter {
private final Configuration configuration;
private ByteBuffer byteBuffer;
public TCPConnector(final String hostname, final int port, final Configuration configuration) {
this.configuration = configuration;
try {
......@@ -65,7 +67,10 @@ public class TCPConnector extends AbstractSink implements IWriter {
@Override
protected void processRecord(final IRecord record,
final HostApplicationMetaDataRecord hostApplicationMetaData) {
// send(); TODO
if (record.getRecordSizeInBytes() > byteBuffer.remaining()) {
send(byteBuffer);
}
record.putIntoByteBuffer(byteBuffer);
}
private void send(final ByteBuffer buffer) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment