Results 1 to 2 of 2

Thread: Determining TWinSocketStream max read speed

  1. #1

    Determining TWinSocketStream max read speed

    According to Delphi's help:

    Read may return 0 if the socket connection is extremely slow and the read operation has not completed after TimeOut milliseconds. This ensures that the Read method does not hang indefinitely when a problem occurs with the socket connection.

    To guard against the Read method timing out because of a slow connection, set Count fairly low, and make several calls to Read, rather than fewer calls with a large value of Count.
    Is there a way to determine the best value for Count? I'm thinking on making an algorithm that increases the Count value until a relevant slow down is detected.

  2. #2

    Determining TWinSocketStream max read speed

    I always use 256 but I haven't looked into or benchmarked speed :?
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •