
CODE: [Copy to clipboard]以上的程序是可以成功发送的了!!在WINDOWS端的程序已经可以接收到了!#include <stdio.h>
#include <tcp.h>
int main()
{
word status;
word port;
longword host;
udp_Socket usock;
//------//
sock_init();
host=resolve("192.168.1.28");
port=8001;
//--- OPEN UDP ---//
udp_open(&usock,0,host,port,NULL);
//--- SEND DATA ---//
sock_write(&usock,"发送成功!!",10);
//--- CLOSE UDP ---//
sock_close(&usock);
sock_exit();
}

| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |