Skip to content

Commit

Permalink
feat: mdtp add examples module
Browse files Browse the repository at this point in the history
Signed-off-by: wei <[email protected]>
Co-authored-by: ZhangJian He <[email protected]>
  • Loading branch information
instpe and shoothzj committed Sep 25, 2024
1 parent 964e1f9 commit ccd9260
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
26 changes: 26 additions & 0 deletions mdtp-examples/pom.xml
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-examples</artifactId>

<dependencies>
<dependency>
<groupId>io.github.protocol-laboratory</groupId>
<artifactId>mdtp-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.protocol-laboratory</groupId>
<artifactId>mdtp-server</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
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.client.MdtpClient;
import io.github.protocol.mdtp.client.MdtpClientConfig;

public class MdtpClientExample {
public static void main(String[] args) throws Exception {
MdtpClientConfig mdtpClientConfig = new MdtpClientConfig().host("localhost").port(4146);
MdtpClient mdtpClient = new MdtpClient(mdtpClientConfig);
mdtpClient.start();
}
}
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("localhost").port(4146);
MdtpServer mdtpServer = new MdtpServer(mdtpServerConfig);
mdtpServer.start();
}
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<modules>
<module>mdtp-client</module>
<module>mdtp-examples</module>
<module>mdtp-server</module>
</modules>

Expand Down

0 comments on commit ccd9260

Please sign in to comment.