sktGetData
This method retrieves the current block of data from the buffer and then stores it in a variable of the variant type. If the object is declared using the WithEvents option, then an OnDataArrival event is available in the script environment.
Syntax: oSocket.sktGetData(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.sktGetData(sData, vbString, bytesTotal)
End Sub