Home > database >  PB using winsock. PBL how to achieve p2p file transfer and receive?
PB using winsock. PBL how to achieve p2p file transfer and receive?

Time:09-26

Rt, we discuss,

CodePudding user response:

Using the send function

CodePudding user response:

I did not how to use the file, but the interaction of the characters can also, more a bit lost data

CodePudding user response:

P2P is not made,
Estimate or a server program to receive and store each client connection information such as IP and listener ports connection list.
And, each client need to open a listener ports,
In this way, all through the connection between the client list to find each other's IP and listener ports to connect to send data or something.

CodePudding user response:

Of course, the client listener ports can be random.

CodePudding user response:

Winsock. PBL (pblib21. DLL) one hair message have how old? Who has been using,
Upstairs, if there is no other way, the way is you can choose, I improve,
1. Usually, everyone is working on c/s mode, there is a server, through the server monitoring, make every client connected together,
2. Send the request of A party, the file according to the largest message, after cutting, send messages to each other, each size, how many pieces, order,
3. The receiving party according to from already the machine, the pick up by the order of the port as time past, how many ports (6, 2133213, 4214, 5216,), let's look at efficiency, and then to monitor these ports respectively,
4. The sender sends data, the data plus fixed in front of the several serial number, number of the receiver to receive the take off,
5. The receiver to check data, not received on retransmission,
6. If all finished, notify the sender and the receiver data,
8. Close monitoring,

CodePudding user response:

1,
Winsock. PBL + pblib21. DLL tested, C/S connection one-way to send data (a bit like a walkie-talkie, C after the party finished, S receiving side, and then S side, C's receiving,) send basic there is no limit to the amount of data, because in any sender can limit of data sent a few K at a time, and then send the countless times, the receiver could be as long as according to the received data sequence, the data is too large, of course, you can also use tools like zlib. DLL compression,

2,
Winsock2.0 data hand is not much, don't know what's the other way, such as whether can improve the intercom call what,


CodePudding user response:

Good is good, see if there are any other way,,,

CodePudding user response:

Suggest using c # or c + + to write directly, PB calls, there are those I can write programs labeled

CodePudding user response:

Has the need to ah, if possible, post or send mail to [email protected], thank you

CodePudding user response:

refer to the eighth floor jamescui response:
suggest using c # or c + + to write directly, PB calls, there are those that I can write program with


I have the need, email [email protected], thank you

CodePudding user response:

Focus on

CodePudding user response:

I also want to, [email protected]

CodePudding user response:

I also want to warrior, please send to my email: [email protected]

CodePudding user response:

Do with pb can also, principle figure it out, began to do it.

CodePudding user response:

Can you send a, thank you
[email protected]

CodePudding user response:

WINSOCK. PBL can transmit and receive to achieve p2p file. Simple idea is as follows:
Client: FileOpen> FileRead> Sent (blob) & gt;> FileClose
Server: recv (blob) & gt;> FileWrite> FileClose

If unfortunately not vc + +, using vc + + to winsocket API simple encapsulation, provides a method to obtain buf len, such as GetDataLen (int socket). The PB & amp; PPB can better call API.

http://topic.csdn.net/u/20091116/17/35b80a58-de40-46be-8280-feb4f2294655.html? Seed=714492869 & amp; R=61309307 # r_61309307

CodePudding user response:

Can you send a, thank you
  • Related