|
-
Sep 28th, 2000, 09:27 AM
#1
-
Sep 28th, 2000, 09:31 AM
#2
Addicted Member
Hi,
Don't worry about questions 1,2 and 3. Winsock will sort all that out for you.
4: Not sure about that one
And 5: Don't worry about that either! 
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Sep 28th, 2000, 10:50 AM
#3
Frenzied Member
FWIW, we have a file transfer utility that packs as many records as will fit into a 16KB block before sending it to the PC client.
-
Sep 28th, 2000, 11:32 AM
#4
Originally posted by ccoder
FWIW, we have a file transfer utility that packs as many records as will fit into a 16KB block before sending it to the PC client.
Thanks for the offer, but I don't need an utility, I need (VB) source code.
Why are you using 16kb blocks? Is that the biggest Winsock can handle? So I'll have to chop my data in blocks of 16kb?
Or could I send Winsock as String of say 100Kb and just let it send away? Would it arrive as 100Kb, or as 10Kb packages or so? Will they arrive in the right order?
Main problem: Will this work?
Code:
Winsock1.SendData The_String_Of_100Kb_Or_Greater
-
Sep 28th, 2000, 11:48 AM
#5
Guru
RobIII: I think that code will work. You can use the SendProgress and SendComplete events to monitor the data transfer.
And life isn't short, it's the school year which is too long.
-
Sep 28th, 2000, 06:12 PM
#6
Frenzied Member
RobIII,
I wasn't offering the utility. It was written in house for a specific purpose, to move large numbers of files from our Tandems to servers on the LAN. It's proprietary. And it's all written in C.
I was simply responding to question #4. You don't have to worry about packet size. Let TCP/IP handle it for you. The larger the block of data that you send, the fewer the number of SendData calls you will have to make. If you understand the impact that I/O has on an application, then you can see the reasoning behind this.
I chose 16KB as an optimal blocksize when I wrote the Tandem code. I'm sure you could go larger if you wanted, but there may be other considerations.
My code has to do various edits (i.e. trim, add CRLF if not present, etc.) on every record. We also make heavy use of heartbeats and timeouts in our sockets apps. With that in mind, I didn't want to make the blocksize any larger.
-
Sep 28th, 2000, 07:26 PM
#7
Main problem: Will this work?
Code:
Winsock1.SendData The_String_Of _100 Kb_Or_Greater
It depends largely on the network on which you send it. Winsock is likely to break it up even on a LAN. You won't have to worry if it comes it the right order, TCP will take care of that (it'll get to the other end in the right order). I have some examples of file transfer with Winsock if you are interested.
Sunny
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
|