Skip to content

Hasting/rpc-netty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Rpc netty支持

加入rpc对netty的支持,网络层。和rpc框架实现的nio,oio完全兼容,通信协议一样

###启动服务端

		SimpleRpcServer rpcServer = new SimpleRpcServer();
		rpcServer.setAcceptor(new RpcNettyAcceptor());
		rpcServer.setHost("127.0.0.1");
		rpcServer.setPort(5555);
		rpcServer.register(LoginRpcService.class, new LoginRpcServiceImpl());
		rpcServer.startService();

###启动客户端

		SimpleRpcClient client = new SimpleRpcClient();
		client.setHost("127.0.0.1");
		client.setPort(5555);
		client.setConnectorClass(RpcNettyConnector.class);
		LoginRpcService loginRpcService = client.register(LoginRpcService.class);
		client.startService();

About

rpc netty support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%