-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaces README.md stub with proper README.adoc
- Loading branch information
1 parent
882b953
commit d268405
Showing
2 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
= Java RELP Server Library (rlp_03) | ||
|
||
rlp_03 implements RELP server in Java | ||
|
||
== License | ||
AGPLv3 with link:https://github.com/teragrep/rlp_03/blob/master/LICENSE#L665-L670[additional permissions] granted in the license. | ||
|
||
== Features | ||
Current | ||
|
||
- RELP Server | ||
|
||
== Setting dependencies | ||
[source, xml] | ||
---- | ||
<?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> | ||
---- | ||
|
||
== Example | ||
|
||
[source, java] | ||
---- | ||
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); | ||
} | ||
} | ||
} | ||
---- |