Interface NetworkManager.ByteMatcher
- Enclosing class:
NetworkManager
public static interface NetworkManager.ByteMatcher
Byte stream match filter for routing.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[][]intmatches(TransportHelper transport, ByteBuffer to_compare, int port) Check byte stream for match.intNumber of bytes of buffer at or beyond which the "match" method will be called to test for a matchintmaxSize()Get the max number of bytes this matcher requires.minMatches(TransportHelper transport, ByteBuffer to_compare, int port) Check for a minimum matchintminSize()Get the minimum number of bytes required to determine if this matcher applies
-
Method Details
-
getDescription
String getDescription() -
matchThisSizeOrBigger
int matchThisSizeOrBigger()Number of bytes of buffer at or beyond which the "match" method will be called to test for a match- Returns:
-
maxSize
int maxSize()Get the max number of bytes this matcher requires. If it fails with this (or more) bytes then the connection will be dropped- Returns:
- size in bytes
-
minSize
int minSize()Get the minimum number of bytes required to determine if this matcher applies- Returns:
-
matches
Check byte stream for match.- Parameters:
to_compare-address- the originator of the connection- Returns:
- return "routing data" in case of a match, null otherwise
-
minMatches
Check for a minimum match- Parameters:
to_compare-- Returns:
- return "routing data" in case of a match, null otherwise
-
getSpecificPort
int getSpecificPort()
-