- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,我使用默认的 Jgroups-UDP 配置运行了 2 个 infinispan 服务器 6.0.0.CR1 实例,但没有看到集群形成。我更新了默认 Jgroups UDP 配置接口(interface)以指向计算机 IP,而不是环回地址。
<interface name="management">
<inet-address value="${jboss.bind.address.management:10.51.11.218}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:10.51.11.218}"/>
</interface>
来自 Machine1 的日志:
=========================================================================
JBoss Bootstrap Environment
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=clustered.xml -Dsun.nio.ch.bugLevel=''
=========================================================================
09:53:33,218 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
09:53:33,501 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
09:53:33,616 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015899: JBoss Infinispan Server 6.0.0.CR1 (AS 7.2.0.Final) starting
09:53:35,570 INFO [org.xnio] (MSC service thread 1-1) XNIO Version 3.0.7.GA
09:53:35,582 INFO [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.0.7.GA
09:53:35,592 INFO [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.2.14.GA
09:53:35,572 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
09:53:35,749 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) JBAS010280: Activating Infinispan subsystem.
09:53:35,769 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 22) JBAS010260: Activating JGroups subsystem.
09:53:35,807 INFO [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final)
09:53:36,014 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) JBAS013171: Activating Security Subsystem
09:53:36,153 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) JBAS011800: Activating Naming Subsystem
09:53:36,288 INFO [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.15.Final
09:53:36,308 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 31) JBAS012605: Activated the following JSF Implementations: [main, 1.2]
09:53:36,367 INFO [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
09:53:36,650 WARN [org.infinispan.configuration.global.TransportConfigurationBuilder] (MSC service thread 1-1) ISPN000254: The transport element's 'strictPeerToPeer' attribute is no longer in use.
09:53:36,970 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/10.51.11.215:8080
09:53:37,111 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003000: Coyote HTTP/1.1 starting on: http-/10.51.11.215:8080
09:53:37,124 INFO [org.apache.coyote.ajp] (MSC service thread 1-2) JBWEB003046: Starting Coyote AJP/1.3 on ajp-/10.51.11.215:8089
09:53:37,355 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010000: HotRodServer starting
09:53:37,356 INFO [org.infinispan.server.endpoint] (MSC service thread 1-4) JDGS010000: REST starting
09:53:37,431 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010001: HotRodServer listening on 10.51.11.215:11222
09:53:37,431 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010000: WebSocketServer starting
09:53:37,432 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010001: WebSocketServer listening on 10.51.11.215:8181
09:53:37,836 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-2) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.CR1
09:53:38,067 INFO [org.infinispan.server.endpoint] (MSC service thread 1-4) JDGS010002: REST mapped to /rest
09:53:38,089 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000078: Starting JGroups Channel
09:53:38,145 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-3) JGRP000015: the send buffer of socket DatagramSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
09:53:38,146 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:53:38,146 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-3) JGRP000015: the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
09:53:38,147 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-3) JGRP000015: the send buffer of socket MulticastSocket was set to 640KB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max send buffer in the OS correctly (e.g. net.core.wmem_max on Linux)
09:53:38,147 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-3) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 131.07KB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
09:53:38,151 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-4) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:53:38,155 INFO [stdout] (MSC service thread 1-3)
09:53:38,155 INFO [stdout] (MSC service thread 1-3) -------------------------------------------------------------------
09:53:38,155 INFO [stdout] (MSC service thread 1-3) GMS: address=lpv-ecisdev215/clustered, cluster=clustered, physical address=10.51.11.215:55200
09:53:38,156 INFO [stdout] (MSC service thread 1-3) -------------------------------------------------------------------
09:53:38,156 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started jboss-web-policy cache from security container
09:53:38,157 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) JBAS010281: Started other cache from security container
09:53:38,259 INFO [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 32) Initializing mod_cluster 1.2.3.Final
09:53:38,279 INFO [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 32) Listening to proxy advertisements on 224.0.1.115:23,364
09:53:43,187 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000094: Received new cluster view: [lpv-ecisdev215/clustered|0] [lpv-ecisdev215/clustered]
09:53:43,319 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-3) ISPN000079: Cache local address is lpv-ecisdev215/clustered, physical addresses are [10.51.11.215:55200]
09:53:43,373 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:53:43,390 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-4) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:53:43,395 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started memcachedCache cache from clustered container
09:53:43,398 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:53:43,401 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) JBAS010281: Started namedCache cache from clustered container
09:53:43,405 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started default cache from clustered container
09:53:43,425 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) JDGS010000: MemcachedServer starting
09:53:43,426 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) JDGS010001: MemcachedServer listening on 10.51.11.215:11211
09:53:43,634 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 10.51.11.215:9999
09:53:43,645 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 10.51.11.215:4447
09:53:44,403 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:53:44,433 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started ___hotRodTopologyCache cache from clustered container
09:53:44,781 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://10.51.11.215:9990/management
09:53:44,784 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://10.51.11.215:9990
09:53:44,784 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Infinispan Server 6.0.0.CR1 (AS 7.2.0.Final) started in 11981ms - Started 93 of 142 services (49 services are passive or on-demand)
09:53:54,327 WARN [org.jgroups.protocols.UDP] (TransferQueueBundler,shared=udp) null: no physical address for 71cc339a-27ad-278a-919e-b6c2e17e01db, dropping message
09:54:30,596 WARN [org.jgroups.protocols.UDP] (TransferQueueBundler,shared=udp) null: no physical address for 71cc339a-27ad-278a-919e-b6c2e17e01db, dropping message
09:55:25,051 WARN [org.jgroups.protocols.UDP] (TransferQueueBundler,shared=udp) null: no physical address for 71cc339a-27ad-278a-919e-b6c2e17e01db, dropping message
来自机器 2 的日志:
./clustered.sh -b 10.51.11.218
=========================================================================
JBoss Bootstrap Environment
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=clustered.xml -Dsun.nio.ch.bugLevel=''
=========================================================================
09:48:25,167 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
09:48:25,448 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
09:48:25,551 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015899: JBoss Infinispan Server 6.0.0.CR1 (AS 7.2.0.Final) starting
09:48:27,469 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
09:48:27,555 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 19) JBAS010280: Activating Infinispan subsystem.
09:48:27,570 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 31) JBAS012605: Activated the following JSF Implementations: [main, 1.2]
09:48:27,591 INFO [org.xnio] (MSC service thread 1-4) XNIO Version 3.0.7.GA
09:48:27,607 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.0.7.GA
09:48:27,621 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 3.2.14.GA
09:48:27,665 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 22) JBAS010260: Activating JGroups subsystem.
09:48:27,695 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 25) JBAS011800: Activating Naming Subsystem
09:48:27,924 INFO [org.jboss.as.security] (ServerService Thread Pool -- 27) JBAS013171: Activating Security Subsystem
09:48:27,972 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013170: Current PicketBox version=4.0.15.Final
09:48:28,224 INFO [org.apache.coyote.ajp] (MSC service thread 1-4) JBWEB003046: Starting Coyote AJP/1.3 on ajp-/10.51.11.218:8089
09:48:28,302 INFO [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final)
09:48:28,385 INFO [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/10.51.11.218:8080
09:48:28,446 INFO [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003000: Coyote HTTP/1.1 starting on: http-/10.51.11.218:8080
09:48:28,452 INFO [org.jboss.modcluster.ModClusterService] (ServerService Thread Pool -- 32) Initializing mod_cluster 1.2.3.Final
09:48:28,538 INFO [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (ServerService Thread Pool -- 32) Listening to proxy advertisements on 224.0.1.115:23,364
09:48:28,628 INFO [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service
09:48:28,745 WARN [org.infinispan.configuration.global.TransportConfigurationBuilder] (MSC service thread 1-2) ISPN000254: The transport element's 'strictPeerToPeer' attribute is no longer in use.
09:48:28,963 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on 10.51.11.218:9999
09:48:28,973 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 10.51.11.218:4447
09:48:29,339 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010000: WebSocketServer starting
09:48:29,339 INFO [org.infinispan.server.endpoint] (MSC service thread 1-1) JDGS010001: WebSocketServer listening on 10.51.11.218:8181
09:48:29,355 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010000: REST starting
09:48:29,563 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.CR1
09:48:29,801 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010002: REST mapped to /rest
09:48:29,803 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010000: HotRodServer starting
09:48:29,803 INFO [org.infinispan.server.endpoint] (MSC service thread 1-3) JDGS010001: HotRodServer listening on 10.51.11.218:11222
09:48:29,829 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000078: Starting JGroups Channel
09:48:29,893 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-1) JGRP000015: the receive buffer of socket DatagramSocket was set to 20MB, but the OS only allocated 4.19MB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
09:48:29,893 WARN [org.jgroups.protocols.UDP] (MSC service thread 1-1) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 4.19MB. This might lead to performance problems. Please set your max receive buffer in the OS correctly (e.g. net.core.rmem_max on Linux)
09:48:29,913 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-4) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:48:29,924 INFO [stdout] (MSC service thread 1-1)
09:48:29,925 INFO [stdout] (MSC service thread 1-1) -------------------------------------------------------------------
09:48:29,925 INFO [stdout] (MSC service thread 1-1) GMS: address=lpv-ecisdev218/clustered, cluster=clustered, physical address=10.51.11.218:55200
09:48:29,925 INFO [stdout] (MSC service thread 1-1) -------------------------------------------------------------------
09:48:29,920 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:48:29,931 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-4) JBAS010281: Started other cache from security container
09:48:29,931 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started jboss-web-policy cache from security container
09:48:34,981 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000094: Received new cluster view: [lpv-ecisdev218/clustered|0] [lpv-ecisdev218/clustered]
09:48:35,133 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (MSC service thread 1-1) ISPN000079: Cache local address is lpv-ecisdev218/clustered, physical addresses are [10.51.11.218:55200]
09:48:35,214 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:48:35,255 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started namedCache cache from clustered container
09:48:35,262 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-2) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:48:35,264 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010281: Started memcachedCache cache from clustered container
09:48:35,264 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) JDGS010000: MemcachedServer starting
09:48:35,265 INFO [org.infinispan.server.endpoint] (MSC service thread 1-2) JDGS010001: MemcachedServer listening on 10.51.11.218:11211
09:48:35,269 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-1) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:48:35,277 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-1) JBAS010281: Started default cache from clustered container
09:48:36,360 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform MBean server.
09:48:36,391 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started ___hotRodTopologyCache cache from clustered container
09:48:36,580 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://10.51.11.218:9990/management
09:48:36,580 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://10.51.11.218:9990
09:48:36,597 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Infinispan Server 6.0.0.CR1 (AS 7.2.0.Final) started in 11856ms - Started 93 of 142 services (49 services are passive or on-demand)
来自第一台机器的 Ifconfig:
找不到命令
/sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:9D:50:89
inet addr:10.51.11.215 Bcast:10.51.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:341548 errors:0 dropped:0 overruns:0 frame:0
TX packets:474190 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:49619673 (47.3 MiB) TX bytes:108671222 (103.6 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:562 errors:0 dropped:0 overruns:0 frame:0
TX packets:562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:176331 (172.1 KiB) TX bytes:176331 (172.1 KiB)
来自第二台机器的 Ifconfig:
eth0 Link encap:Ethernet HWaddr 00:50:56:9D:71:E3
inet addr:10.51.11.218 Bcast:10.51.11.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe9d:71e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6202451 errors:0 dropped:0 overruns:0 frame:0
TX packets:1164337 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1805709659 (1.6 GiB) TX bytes:140887855 (134.3 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:45811520 errors:0 dropped:0 overruns:0 frame:0
TX packets:45811520 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15389551121 (14.3 GiB) TX bytes:15389551121 (14.3 GiB)
最佳答案
检查这些计算机中的防火墙设置,它们可能会阻止 UDP 流量。您可以使用Wireshark验证 UDP 数据包是否确实离开计算机,或在 org.jgroups 包中启用 TRACE 日志记录。此外,路由器/交换机可以配置为不允许 UDP 流量。最后,如果无法使其工作,请更改为 TCP 作为主要传输协议(protocol),并使用 TCPPING 来发现节点,传入形成集群的两个节点的 IP 地址。切换到 TCP 很简单,只需传入 -Djboss.default.jgroups.stack=tcp
即可,但是需要在 standalone/configuration/clustered.xml
中切换 TCPPING 的 MPING 配置>:
<protocol type="TCPPING">
<property name="initial_hosts">10.51.11.215[7600],10.51.11.218[7600]</property>
</protocol>
关于java - 未通过 UDP 多播形成集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19711559/
我刚刚了解了 udp 校验和计算。 但我很困惑算法是否检测到所有错误。 最佳答案 当然不是。没有校验和可以检测到所有错误。 关于udp - UDP 校验和是否检测到所有错误?,我们在Stack Ove
下面这个函数有什么问题?? 它应该抛出错误,因为我没有在本地主机上运行 UDP 服务器。 int openUdpSocket(int port) { int sock,sin_size;
我正在尝试修改这两个程序。我想让 udpclient.c 能够接收消息并让 udpserver.c 将消息回显给客户端。我还想在 udpclient 发送消息之前先获取它们的时间标记消息。收到的消息应
我有相当简单的 UDP 服务器写在 c 上。 有时我需要知道在套接字中排队的所有 udp 数据包(字节)的当前长度。 据我了解,getsockopt 没有得到这样的信息。 欢迎使用 Linux 和 F
除了直播音乐/视频外,谁能告诉在哪里使用 UDP 协议(protocol)? UDP 的默认用例是什么? 最佳答案 其他任何您需要性能但如果数据包在途中丢失时可以生存的东西。例如,多人游戏浮现在脑海中
与 TCP 的监视方法相反,UDP 是否会在所有数据包可用时立即发送它们? 谢谢。 最佳答案 TCP 有拥塞控制,UDP 没有,因为它是无连接的。 但是您的问题涉及多个问题:发送消息是否会导致立即发送
我知道 UDP 本质上是不可靠的,但是当连接到 localhost 时,我希望内核以不同的方式处理连接,因为一切都可以在内部处理。那么在这种特殊情况下,UDP 是否被认为是一种可靠的协议(protoc
我正在尝试使用 flash 和 rtmfp 协议(protocol)开发一个实时视频聊天应用程序,但我有疑问rtmfp 如何保证连接对等点,尤其是当对等点位于不同网络时。 最佳答案 RTMFP 依靠中
我发现所有使用 Netty 4.0 的 TCP 服务器实现都使用了 ServerBootstrap 实例。 The biggest and only difference between a serv
对于个人 MMO 游戏项目,我正在 java 中实现一个自制的可靠的基于 UDP 的协议(protocol)。鉴于我当前的设置,我相信窥探者劫持 session 相对简单,因此为了防止这种情况,我借此
我正在尝试手动计算各种 UDP 数据包的校验和,但与 Wireshark 中显示的结果相比,我总是得到错误的结果。下面是我如何做到这一点的示例: Source Address: 192.168.0.1
我正在尝试手动计算各种 UDP 数据包的校验和,但与 Wireshark 中显示的结果相比,我总是得到错误的结果。下面是我如何做到这一点的示例: Source Address: 192.168.0.1
我有一个奇怪的问题。我有一个成功运行的 C++ (boost asio) P2P 应用程序,它可以在大多数 NAT 上运行。问题是,当我将初始启动端口号指定为 1000 时,它会检查 1000 是否空
带有数据源的短 radio 链路,需要通过 IPv6 的 1280 Kbps 吞吐量,使用 UDP 停止和等待协议(protocol),该区域内没有其他客户端或明显的噪声源。我到底如何才能计算出最佳数
似乎可以在没有有效负载的情况下发送 UDP 数据包。 我能想到的唯一不需要有效载荷的就是用于 NAT 打洞。 这还能用来做什么? 这与我之前的问题有关Under Linux, can recv eve
我有一个客户端,我无法更改其代码 - 但我想(重新)使用 编写代码ZeroMQ socket 。 客户端同时使用原始 TCP 和原始 UDP socket 。 我知道我可以使用 ZMQ_ROUTER_
网络 4.0.24 我通过 UDP 传递 XML。收到 UPD 数据包时,数据包的长度始终为 2048,截断消息。尽管如此,我尝试将接收缓冲区大小设置为更大的值(4096、8192、65536),但它
我正在尝试编写一个有关 UDP 连接的简单程序来了解它们。我已经实现了一些基本的事情,但是当我尝试发送并取回我发送的内容时,我遇到了一些问题,例如, 当我这样做时;发送一个字符串 “asd”到服务器我
当我检查时,我在 UDP 客户端每 100 毫秒从服务器发送 UDP 数据包 接收频率不等于 100 毫秒,有时它要少得多,例如 3 毫秒…10 毫秒。 我知道UDP client server是异步
海友我是一个学习winsock2的新手。以下是我的udp服务器和客户端程序。 我这个程序客户端不知道服务器的IP地址,只知道端口。但是服务器会在整个网络中广播一条消息。 当客户端收到消息时,它会回溯服
我是一名优秀的程序员,十分优秀!