Example usage for io.vertx.core.parsetools.impl RecordParserImpl newFixed

List of usage examples for io.vertx.core.parsetools.impl RecordParserImpl newFixed

Introduction

In this page you can find the example usage for io.vertx.core.parsetools.impl RecordParserImpl newFixed.

Prototype

static RecordParser newFixed(int size, Handler<Buffer> output) 

Source Link

Document

Like #newFixed(int) but set the output that will receive whole records which have been parsed.

Usage

From source file:io.servicecomb.foundation.vertx.server.TcpParser.java

License:Apache License

/**
 * ??parser?//  ww  w  . j  av  a 2  s.co  m
 */
protected void reset() {
    parser = RecordParserImpl.newFixed(TCP_HEADER_LENGTH, this::onParse);
    status = ParseStatus.TCP_HEADER;

    parser.handle(Buffer.buffer(0));
}