| |

VerySource

 Forgot password?
 Register
Search
View: 768|Reply: 2

Urgently asked a question about socket programming

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-11 20:20:01
| Show all posts |Read mode
With UDP protocol,
When sending data using the sendto (...) function, it always returns 1 instead of the number of bytes of data sent, but the receiver can receive the data correctly. Is that why?
Thanks a lot
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-23 12:18:01
| Show all posts
Check the socket document you used. It may return 1 to indicate that the sending was successful, which is not the same as the general definition.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 23:45:01
| Show all posts
Is it winsock?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list