sktPeekData
This method operates in a fashion similar to the sktGetData method. However, it does not remove data from the input queue. It is used to see what data is coming before using the sktGetData method to retrieve and delete the data from the receive buffer. This method works only for TCP connections.
Syntax: oSocket.sktPeekData(vData, [vType], [vMaxLen])
vData (Variant) Where retrieved data will be stored after the method returns successfully. If there is not enough data available for requested type, vData will be set to Empty.
vType         (Variant) Optional – specifies the type of data being retrieved
Byte               = vbByte 
Integer           = vbInteger 
Long              = vbLong 
Single            = vbSingle 
Double           = vbDouble 
Currency        = vbCurrency 
Date              = vbDate 
Boolean         = vbBoolean 
SCODE         = vbError 
String            = vbString 
Byte Array      = vbArray + vbByte
vMaxLen (Variant) Optional – Specifies the desired size when receiving a byte array or a string. If this parameter is missing for byte array or string, all available data will be retrieved. If provided for data types other than byte array and string, this parameter is ignored.
Group :Socket Object
Example:
Dim WithEvents oSocket As Socket ' module level Dim
Private Sub oSocket_OnDataArrival(ByVal bytesTotal As Long)
On Error Resume Next
'
Dim sData As String
Set oSocket = New Socket
oSocket.sktPeekData(sData, vbString, bytesTotal)
End Sub