oh yes hack ..pardon me for not providing the full detail..
here's what i did
Code:
 Private Sub sock1_DataArrival(ByVal bytesTotal As Long)
Dim hash As String, bash As String
Dim strHeader As String

sock1.GetData dat, vbString        
strHeader = Left(dat, 3) ' the first 3 bytes is the header of the packet for my server ..for other serve it may differ!

Select Case strHeader

      Case Is = HextoAscii("02 00 C9 ") 'i converted the first 3 byte to hex for better understanding ;) 
        now i code under this section for this packet,or invoke a command
    

'similarly for different header i code differently
 
case is =hextoascii("02 00 C0 ")
  'write a script
end select
end sub