Results 1 to 3 of 3

Thread: winsock vb6 dataarrvival oversize content-length help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    148

    winsock vb6 dataarrvival oversize content-length help

    I was wondering what is the best way to grab over size content-length http dataarrival? because if over size data it will come in more the once

    the header contain with content-length, lets say the Content-Length: 1968


    how do u get only once.


    thank you.

  2. #2
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: winsock vb6 dataarrvival oversize content-length help

    As far as I know you can't force Winsock to receive all data at once and have the DataArrival event only fire once. When receiving large data, the DataArrival event will fire multiple times and you'll have to join the incoming data yourself. Or what do you exactly mean with "over size content-length" ?

    vb Code:
    1. Private strAllData As String
    2.  
    3. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    4.     Dim strData As String
    5.    
    6.     Winsock1.GetData strData, vbString
    7.    
    8.     strAllData = strAllData & strData
    9.    
    10. End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    148

    Re: winsock vb6 dataarrvival oversize content-length help

    Quote Originally Posted by Chris001 View Post
    As far as I know you can't force Winsock to receive all data at once and have the DataArrival event only fire once. When receiving large data, the DataArrival event will fire multiple times and you'll have to join the incoming data yourself. Or what do you exactly mean with "over size content-length" ?

    vb Code:
    1. Private strAllData As String
    2.  
    3. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    4.     Dim strData As String
    5.    
    6.     Winsock1.GetData strData, vbString
    7.    
    8.     strAllData = strAllData & strData
    9.    
    10. End Sub
    thankx for your reply
    the bad thing i'm working with bytes and array not with string on dataarrival.

Posting Permissions

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



Click Here to Expand Forum to Full Width