![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-10-31 09:31 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS开发编程 & 发展交流 (开发室) » How to set the listening port and receive data for wattcp UDP? |
| Printable Version 1,765 / 3 |
| Floor1 BSL007 | Posted 2008-12-02 22:32 |
| 新手上路 Posts 5 Credits 14 | |
|
About wattcp, how to set the listening port and receive data?
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~! ![]() |
|
| Floor2 jackem | Posted 2008-12-05 00:03 |
| 新手上路 Posts 8 Credits 16 | |
|
sock_receive()直接收
|
|
| Floor3 jackem | Posted 2008-12-05 00:09 |
| 新手上路 Posts 8 Credits 16 | |
|
```c
int revLen; char revBuff[1024]; udp_open(&udpSock, localPort, 0, 0, NULL); tcp_tick(NULL); // Give the protocol stack a chance to execute if ((revLen = sock_dataready(&udpSock)) != 0) // Check if data has arrived { sock_fastread(&udpSock, (byte*)revBuff, revLen); // Receive data } ``` |
|
| Floor4 BSL007 | Posted 2008-12-07 03:51 |
| 新手上路 Posts 5 Credits 14 | |
|
Thanks to the brother above~!
But the packet loss is too serious~! Gave up~! Thanks~! |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |