Attempting to read the Shoutcast stream using inet.
I connect ok, I receive streams.
But I can't get anything from "GetChunk"
Is it a way to find out what has been sent and received???
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim txt
Dim vtData
Dim bdone
Select Case State
Case icResolvingHost
txt = "1. Resolving Host"
Case icHostResolved
txt = "2. Host Resolved"
Case icConnecting
txt = "3. Connecting"
Case icConnected
txt = "4. Connected"
Case icRequesting
txt = "5. Requesting"
Case icRequestSent
txt = "6. Request Sent"
Case icReceivingResponse
txt = "7. Receiving Response"
Case icResponseReceived
On Error GoTo closeit
txt = "8. Response Received"
' vtData = Inet1.GetChunk(512)
' vtData = Inet1.GetChunk(1024, icString)
DoEvents
txt = txt & vtData
' Do While Not bDone
' strData = strData & vtData
' Get next chunk.
' vtData = Inet1.GetChunk(1024, icString)
DoEvents
' If Len(vtData) = 0 Then
' bDone = True
' End If
' Loop
Case icDisconnecting
txt = "9. Disconnecting"
Case icDisconnected
txt = "10. Disconnected"
Case icError
txt = "11. Error"
Case icResponseCompleted
txt = "12. Response Completed"
End Select
Text1.Text = Text1.Text & Chr(13) & Chr(10) & txt
Exit Sub
closeit:
Inet1.cancel
End Sub