There are 2 problems:
First, I don't know why you have an Index for the socket when for the client you should have only one connection. If this is for the server (instead of client) then the code should be diferent. If it's the server then you have to give each file a unique name because otherwise you will write data from all clients into one file, and I'm sure you don't want that...

Second: The next code you should use only for transfering the image file, if you transfer data other than the file, then you have to change the code for the other types of data. Since I don't know what else you transfer (how and what format), I could not write the code to support that also.

OK, here is the code, I did not test it, but it should work:
VB Code:
  1. Private Sub WS_DataArrival(Index As Integer, ByVal bytesTotal As Long)
  2.     Dim sData As String, Pos As Long
  3.    
  4.     ' make the variales static so the data gets preserved between calls
  5.     ' you can dim next variables in the
  6.     ' General Declarations section also (but remove next line if you do so)
  7.     Static DataLength As Long, FileNum As Integer
  8.    
  9.     '"image":length:data...
  10.     WS(Index).GetData sData, vbString
  11.    
  12.     ' first time, read header and open file
  13.     If DataLength = 0 And LCase(Left(sData, 6)) = "image:" Then
  14.         ' get the total data length
  15.         DataLength = Val(Split(sData, ":")(1))
  16.        
  17.         ' find the second ":"
  18.         Pos = InStr(1, sData, ":")
  19.         Pos = InStr(Pos + 1, sData, ":")
  20.        
  21.         ' get only the bitmap data (stip off the header)
  22.         sData = Mid$(sData, Pos + 1)
  23.        
  24.         FileNum = FreeFile
  25.         Open "C:\Draw.bmp" For Binary Lock Write As FileNum
  26.     End If
  27.    
  28.     ' save data into file
  29.     If DataLength > 0 And FileNum <> 0 Then
  30.         Put FileNum, LOF(FileNum) + 1, sData
  31.        
  32.         ' we received all the data that we are supposed to receive
  33.         If LOF(FileNum) >= DataLength Then
  34.             ' close the file, and reset variables
  35.             Close FileNum
  36.             DataLength = 0
  37.             FileNum = 0
  38.            
  39.             ' load picture
  40.             picMain.Picture = LoadPicture("C:\Draw.bmp")
  41.            
  42.             ' delete temporary picture file
  43.             Kill "C:\Draw.bmp"
  44.         Else
  45.     End If
  46. End Sub