阅读:567回复:0
请教一个UDP包发送的问题
我用KDatagramSocket的sendto 发包,OnReceive收包,但是好像传输超过1500字节的UDP包就只能发送前面的部分。除了打破UDP报,还有什么其他办法啊?
还有就是帮助中关于Onreceive()中的帮助谁能帮我解释一下?到底Available表示什么啊? UDP包长度?还是缓冲区大小?这个是不是解决包比较大的情况阿?rt OnReceive() is called by the framework to indicate the reception of a complete TSDU (datagram) by the transport. The user overrides OnReceive() to implement custom receive processing. After examining the buffer indicated by Data, the user should return a number of bytes consumed. Typically it is equal to Indicated. On some occasions, the transport might not indicate a complete datagram, i.e. Available > Indicated. In this case, the client should provide a page -locked buffer specified by output parameters RcvBuffer/RcvBufferLen, to accept the remainder of the TSDU. When the transport completes the request , another overridable handler, OnReceiveComplete() is called. If the client fails to provide the buffer, the receive data can be lost. OnReceive() is called at the DISPATCH_LEVEL. Whenever a lengthy processing is required, the driver should copy the indicated data and schedule a work item to do so. |
|