rlp_03 implements RELP server in Java
AGPLv3 with additional permissions granted in the license.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependencies>
<!-- this library -->
<dependency>
<groupId>com.teragrep</groupId>
<artifactId>rlp_03</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
import com.teragrep.rlp_03.Server;
import com.teragrep.rlp_03.SyslogFrameProcessor;
import java.io.IOException;
import java.util.function.Consumer;
public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
final Consumer<byte[]> cbFunction;
cbFunction = (message) -> {
System.out.println(new String(message));
};
int port = 1601;
Server server = new Server(port, new SyslogFrameProcessor(cbFunction));
server.start();
while (true) {
Thread.sleep(1000L);
}
}
}
You can involve yourself with our project by opening an issue or submitting a pull request.
Contribution requirements:
-
All changes must be accompanied by a new or changed test. If you think testing is not required in your pull request, include a sufficient explanation as why you think so.
-
Security checks must pass
-
Pull requests must align with the principles and values of extreme programming.
-
Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).
Read more in our Contributing Guideline.
Contributors must sign Teragrep Contributor License Agreement before a pull request is accepted to organization’s repositories.
You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep’s repositories.