-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create udp protocol? I read the default is tcp #225
Comments
Hi @B1gB1gRAin, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.
Your question How to create udp protocol? I read that the default is tcp? If I want to create a UDP related server, do I need to manually extend this part of the code
|
How to create udp protocol?
|
I don’t think it’s supported UDP yet,but you can Try like this: BootStrap bootstrap = new BootStrap() |
当前都是基于TCP协议的版本,没有验证过UDP。 |
Your question
该如何创建udp 协议呢?我看了下默认是tcp的?
如果我要创建udp相关的服务端 我需要手动去扩展这部分代码吗
` this.bootstrap = new ServerBootstrap();
this.bootstrap
.group(bossGroup, workerGroup)
.channel(NettyEventLoopUtil.getServerSocketChannelClass())
.option(ChannelOption.SO_BACKLOG, ConfigManager.tcp_so_backlog())
.option(ChannelOption.SO_REUSEADDR, ConfigManager.tcp_so_reuseaddr())
.childOption(ChannelOption.TCP_NODELAY, ConfigManager.tcp_nodelay())
.childOption(ChannelOption.SO_KEEPALIVE, ConfigManager.tcp_so_keepalive())
.childOption(ChannelOption.SO_SNDBUF,
tcpSoSndBuf != null ? tcpSoSndBuf : ConfigManager.tcp_so_sndbuf())
.childOption(ChannelOption.SO_RCVBUF,
tcpSoRcvBuf != null ? tcpSoRcvBuf : ConfigManager.tcp_so_rcvbuf());
感谢平台 感谢开源
Your scenes
需要udp 消息和tcp的广播
Your advice
describe the advice or solution you'd like
Environment
java -version
):1.8uname -a
):win7The text was updated successfully, but these errors were encountered: