即使我定义了边界范围,我也遇到了越界异常?我对自定义引擎相当陌生,所以我查了一下,没有相关结果。
这是我的代码:
#CDC /Project.plg /
function Send(sender n, receiver s) {
linear st = new IndexRange
st.sender(n, s.timeout())
t = n.senderTimeout / 2
n.Send(packet:"5000",value:"5",Timer t)
s.ttl(t)
bounds n
{
for (t != null)
n.SendOption(t, st, n.packetRange(true))
return; st.Status.ToString()
}
}
/Project.plg / #CDC
谢谢!
最佳答案
您定义了“n”的边界,但没有调用“n.packetIndex()”范围以及您输入的数据包范围。
您还必须在发送数据包后调用边界,否则在运行 .plg 时将收到“Netty Timeout”编译错误。
bounds n
{
for (t != null)
n.sendOption(t, st, n.packetIndex(this.packetRange(true, 1), for n.packetIndex PIN)
Sweep;
returns; n + st.status.toString()
n.sends.maxBoundary(st, this.range(Random rand for Exc != st))
sweep:
n.packetRange(index, t)
t.Range(timeoutRange.index).Default().invoke()
}
如果您的网络方法不包括“SWEEP”,那么您可以使用“indexarray”方法。
bounds n
{
for (t != null)
n.sendOption(t, st, n.packetIndex(this.packetRange(true, 1), for n.packetIndex PIN)
st.indexRange.Default().invoke()
returns; n + st.status.toString()
n.sends.maxBoundary(st, this.range(Random rand for Exc != st))
boundaryIndex i = new n.sendOption
t.alias.toString(n)
st : t != true {
n.packetRange(index, t)
t.Range(timeoutRange.index).Default().invoke()
}
}
如果您使用第二种方法,请将“#CDC-CommonIndex”标记与所有调用的标记一起放置。
s : st.senderRange(index)
$
/
#CDC-CommonIndex
#CDC-Plugin
#CDC-Net
/
$
老实说,我偶然发现你的问题,你真的很幸运,我认为这个论坛甚至不支持#CDC插件开发。不客气。
关于c# - #CDC "Send failure: 501 out of bounds exception"向服务器发送数据时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44209484/