UDP

一、说明
使用UDP时,直接使用API代替控件。

第一个程序(ReadBufferUdp)使用来接收到缓存中。

“Destino”变量非常重要,如果你从其他地方接收数据到Buffer,你必须设置Destino = 0 并且在以后执行的时候赋值你将要发送的包的地址给它(after the execution it will have the address which send you the packet.)。
如果你只想从一个指定的地址接收数据,你必须设置变量Destino = <address>.

“gvEncerrar” 用来中止处理过程。(gvEncerrar被设置为全局变量。)

超时时间设置。”Inicio + 12″ = 12 sec of timeout.

第三个程序是用来准备WinSock程序。

二、代码