Results 1 to 8 of 8

Thread: winsock getdata help

  1. #1

    Thread Starter
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    winsock getdata help

    Private Sub wss_DataArrival(Index As Integer, ByVal bytesTotal As Long)
    Dim data As String
    On Error Resume Next
    Dim x As Integer
    data = ""
    wss(Index).GetData data



    If InStrRev(data, "Verification") Then
    Me.Caption = "found"
    Else
    Me.Caption = "not found"
    End If

    'Call KillDupes(List8)
    End Sub

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: winsock getdata help

    and your question is ?

  3. #3

    Thread Starter
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: winsock getdata help

    i want to detect if verification is found that

    If InStrRev(data, "Verification") Then
    Me.Caption = "found"
    Else
    Me.Caption = "not found"
    End If

    always detected as not found because of the else its not working right

  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: winsock getdata help

    Well, you have no Application Protocol so how do you know when all the data has been received?

    You might only be receiving "Ver" in the first DataArrival event and "ification" in the next DataArrival event, or it may take more than 2 DataArrival events to receive all the data. I'm sure we've discussed this in one of your earlier Threads.

  5. #5

    Thread Starter
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: winsock getdata help

    there is a 1 second delay before the data comes this is when the else statement kicks in its bugger

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock getdata help

    Go get one of you old Winsock applications you and I were working on a few months back where the DataArrival event has the correct protocol coded. Use one of them. Remember how you had an end of message delimiter; Hex 30? Your data is only complete when you detect the end of data delimiter otherwise you need to buffer up the incoming data until you find that then you can use your If..Else..End If


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  7. #7
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: winsock getdata help

    @ ladoo this is the exact same thing you have been told before in one or two of your other threads.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  8. #8

    Thread Starter
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: winsock getdata help

    am thinking which source it was am taking a look untill then if you can pull it out can u post thanks.

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