| |

VerySource

 Forgot password?
 Register
Search
Author: laoma321

Ask winsock again!

[Copy link]

0

Threads

1

Posts

2

Credits

Newbie

Rank: 1

Credits
2

 China

Post time: 2020-8-8 23:00:01
| Show all posts
Use winsock.ocx control.
When sending data. Cannot connect to continue senddata later
Bang Bi Duan after connect
In the connect event of ocx. When it is judged that its states value is 7
Then call senddata to send data
Reply

Use magic Report

1

Threads

6

Posts

7

Credits

Newbie

Rank: 1

Credits
7

 China

 Author| Post time: 2020-8-10 00:00:01
| Show all posts
Doesn't it use UDP mode without connect? I want to use UDP connection mode!
Reply

Use magic Report

1

Threads

6

Posts

7

Credits

Newbie

Rank: 1

Credits
7

 China

 Author| Post time: 2020-8-13 17:15:01
| Show all posts
Thank you, everyone for your help, especiallytiger_mars. Basic text transmission has now been achieved! Now there is a new problem. I use the Richtext control to receive data. There is no problem sending text. It is also possible to send small pictures, but there is a problem when sending large pictures, and the other party cannot receive it! What is the reason for this and how to solve it?
Reply

Use magic Report

1

Threads

9

Posts

9

Credits

Newbie

Rank: 1

Credits
9

 China

Post time: 2020-8-14 09:15:01
| Show all posts
It is estimated to be packet loss! Network packet loss is a normal thing.

It is best to send large files in n points. And a verification mechanism must be established, for example, compare the number of bytes between the sender and the receiver to ensure that the received data is the same as the original
Reply

Use magic Report

1

Threads

6

Posts

7

Credits

Newbie

Rank: 1

Credits
7

 China

 Author| Post time: 2020-8-14 10:45:01
| Show all posts
Does the TCP protocol also drop packets? I have split into N times to send, but I don't know how to divide into N times to receive in the datdarriver event. I found that after N times of transmission, the datdarriver event can only receive the last data sent. For example, if 300 bytes are sent and 200 bytes are sent each time, the datdarriver event can only receive the last 100 bytes sent! How to deal with it?
Reply

Use magic Report

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

Points Rules

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

Quick Reply To Top Return to the list