-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: wei <[email protected]>
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
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,26 @@ | ||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.github.protocol-laboratory</groupId> | ||
<artifactId>mdtp-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>mdtp-example</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.github.protocol-laboratory</groupId> | ||
<artifactId>mdtp-client</artifactId> | ||
<version>${version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.github.protocol-laboratory</groupId> | ||
<artifactId>mdtp-server</artifactId> | ||
<version>${version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
13 changes: 13 additions & 0 deletions
13
mdtp-example/src/main/java/io/github/protocol/mdtp/examples/MdtpClientExample.java
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,13 @@ | ||
package io.github.protocol.mdtp.examples; | ||
|
||
import io.github.protocol.mdtp.client.MdtpClient; | ||
import io.github.protocol.mdtp.client.MdtpClientConfig; | ||
|
||
public class MdtpClientExample { | ||
|
||
public static void main(String[] args) { | ||
MdtpClientConfig mdtpClientConfig = new MdtpClientConfig().host("127.0.0.1").port(30001); | ||
new MdtpClient(mdtpClientConfig); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
mdtp-example/src/main/java/io/github/protocol/mdtp/examples/MdtpServerExample.java
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,12 @@ | ||
package io.github.protocol.mdtp.examples; | ||
|
||
import io.github.protocol.mdtp.server.MdtpServer; | ||
import io.github.protocol.mdtp.server.MdtpServerConfig; | ||
|
||
public class MdtpServerExample { | ||
public static void main(String[] args) throws Exception { | ||
MdtpServerConfig mdtpServerConfig = new MdtpServerConfig().host("127.0.0.1").port(8080); | ||
MdtpServer mdtpServer = new MdtpServer(mdtpServerConfig); | ||
mdtpServer.start(); | ||
} | ||
} |
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