Skip to content

Commit

Permalink
保存部分代码
Browse files Browse the repository at this point in the history
Signed-off-by: likaijian <lkjsryx@163.com>
  • Loading branch information
20162430413 committed Oct 19, 2019
1 parent 4081068 commit 02ba0ba
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 21 deletions.
32 changes: 22 additions & 10 deletions EchoClient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,27 @@
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.42.Final</version>
</dependency>
</dependencies>

<build />
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>run-server</id>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.plort.polarlights.raincloud.EchoClient</mainClass>
<!-- <arguments>
<argument>${echo-server.port}</argument>
</arguments> -->
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void initChannel(SocketChannel ch) throws Exception{
ChannelFuture f = b.connect().sync();
f.channel().closeFuture().sync();
}finally{

group.shutdownGracefully().sync();
}
}
}
31 changes: 22 additions & 9 deletions EchoServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,26 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.42.Final</version>
</dependency>
</dependencies>
<build />
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>run-server</id>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.plort.polarlights.raincloud.EchoServer</mainClass>
<!-- <arguments>
<argument>${echo-server.port}</argument>
</arguments> -->
</configuration>
</plugin>
</plugins>
</build>
</project>
28 changes: 27 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,35 @@
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.42.Final</version>
</dependency>
</dependencies>

<modules>
<module>EchoServer</module>
<module>EchoClient</module>
</modules>
<build />

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 02ba0ba

Please sign in to comment.