关于wattcp 如何设置监听端口和接收数据呢?
#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"<img src="images/smilies/face-wink.png" align="absmiddle" border="0">;
port=8001;
udp_open(&usock,0,host,port,NULL);
sock_write(&usock,"发送成功!!",10);
sock_close(&usock);
sock_exit();
}
以上的程序是可以成功发送的了!!在WINDOWS端的程序已经可以接收到了!
但我不知道怎么写DOS端的接收模块!!!!
烦呀~!!!!!!!!!
大家帮帮忙呀~!!!!谢谢了~!<img src="images/smilies/face-sad.png" align="absmiddle" border="0">
About wattcp, how to set the listening port and receive data?
#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;
udp_open(&usock,0,host,port,NULL);
sock_write(&usock,"发送成功!!",10);
sock_close(&usock);
sock_exit();
}
The above program can be successfully sent!! The program on the WINDOWS side has already received it!
But I don't know how to write the receiving module on the DOS side!!!!
So annoying~!!!!!!!!!
Everyone, please help me~!!!! Thank you~!:(