草庐IT

GKMatchSendDataReliable

全部标签

ios - 为什么在使用 GKMatchSendDataReliable 时会丢失数据包?

我有一个多人iOS游戏,我正在使用GKMatchSendDataReliable发送数据。但是,偶尔会丢失数据包。我已经检查了发送端,但没有收到错误。我只是没有在接收时收到它。它是间歇性的,我在接收方法的开头有NSLogs,所以我总是知道什么时候收到消息。GKMatchSendDataReliable是否100%可靠?必须设置我自己的可靠数据发送例程似乎是一种浪费。这似乎只有在一台设备连接到Verizon的LTE网络时才会发生。我还没有尝试过任何其他蜂窝网络。仅使用Wi-Fi时,不一定是相同的wi-fi,它工作正常。 最佳答案 这也

objective-c - GameKit 与 GKMatchSendDataReliable 的通信是否可靠?

我正在使用GameKit.framework并尝试在两部iPhone之间创建可靠通信。我正在使用GKMatchSendDataReliable模式发送包。文档说:GKMatchSendDataReliableThedataissentcontinuouslyuntilitissuccessfullyreceivedbytheintendedrecipientsortheconnectiontimesout.Reliabletransmissionsaredeliveredintheordertheyweresent.Usethiswhenyouneedtoguaranteedelive