|
-
May 9th, 2001, 03:01 PM
#1
Thread Starter
New Member
Pausing Transfers with Winsock ! How come?
I'm building a FTP client and i don't know how pause transfer between the Server and my app with Winsock.
The Server start putting data and never stops, even if i don't use the getdata method.
If i put a Msgbox to ask for stopping, the server still continues putting data in the buffer. Why ?
Does anybody know how pause the transfer while the message is showing without closing and restarting everything ?
Thanks!!!
-
May 10th, 2001, 02:48 AM
#2
Retired VBF Adm1nistrator
Well, to send large amounts of data, what I do is as follows :
Client connects to server
In the Server's ConnectionRequest event, it does any proprietary stuff, and then sends the first packet of data.
Then I use the SendComplete event to send subsequent packets of data.
If I want to slow down the sending of data, in the sendcomplete event I would call my DoSleep sub ;
Code:
Public Sub DoSleep
Dim i As Long
Do Until i = 1500
DoEvents
i = i + 1
Loop
End Sub
The net effect of all that is that once, and only once, a piece of data has been sent, the app will count 1500 (thus appearing to sleep or wait), and then proceed with sending the next piece of data.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
May 10th, 2001, 09:02 AM
#3
Thread Starter
New Member
I don't wanna control the send. I'd like control de receiving data in my client app.
-
May 10th, 2001, 09:24 AM
#4
Retired VBF Adm1nistrator
Well unless you write your own Data Flow Control protocol to be sent down the socket then you cant.
What I mean by this is that the server will send when the client sends the SENDOK command, and will stop when the client sends the NOSEND command.
But apart from that ... pff!
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|