mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-18 10:15:11 +00:00
ref[net]: 重命名JProtobufTcpServer
This commit is contained in:
1 parent
e06982eff3
commit
b45189115b
3 files changed
+5
-5
No files matched your search
+2
-2
@@ -26,9 +26,9 @@ import io.netty.handler.timeout.IdleStateHandler;
|
|||||||
* @author jaysunxiao
|
* @author jaysunxiao
|
||||||
* @version 3.0
|
* @version 3.0
|
||||||
*/
|
*/
|
||||||
public class JProtobufTpcServer extends AbstractServer {
|
public class JProtobufTcpServer extends AbstractServer {
|
||||||
|
|
||||||
public JProtobufTpcServer(HostAndPort host) {
|
public JProtobufTcpServer(HostAndPort host) {
|
||||||
super(host);
|
super(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
package com.zfoo.net.core.jprotobuf.server;
|
package com.zfoo.net.core.jprotobuf.server;
|
||||||
|
|
||||||
import com.zfoo.net.core.jprotobuf.JProtobufTpcServer;
|
import com.zfoo.net.core.jprotobuf.JProtobufTcpServer;
|
||||||
import com.zfoo.util.ThreadUtils;
|
import com.zfoo.util.ThreadUtils;
|
||||||
import com.zfoo.util.net.HostAndPort;
|
import com.zfoo.util.net.HostAndPort;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
@@ -31,7 +31,7 @@ public class JProtobufTcpServerTest {
|
|||||||
public void startServer() {
|
public void startServer() {
|
||||||
var context = new ClassPathXmlApplicationContext("config.xml");
|
var context = new ClassPathXmlApplicationContext("config.xml");
|
||||||
|
|
||||||
var server = new JProtobufTpcServer(HostAndPort.valueOf("127.0.0.1:9000"));
|
var server = new JProtobufTcpServer(HostAndPort.valueOf("127.0.0.1:9000"));
|
||||||
server.start();
|
server.start();
|
||||||
|
|
||||||
ThreadUtils.sleep(Long.MAX_VALUE);
|
ThreadUtils.sleep(Long.MAX_VALUE);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class TcpClientTest {
|
|||||||
|
|
||||||
NetContext.getRouter().asyncAsk(session, ask, AsyncMessAnswer.class, null)
|
NetContext.getRouter().asyncAsk(session, ask, AsyncMessAnswer.class, null)
|
||||||
.whenComplete(answer -> {
|
.whenComplete(answer -> {
|
||||||
logger.info("同步请求收到结果[{}]", JsonUtils.object2String(answer));
|
logger.info("异步请求收到结果[{}]", JsonUtils.object2String(answer));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user