Hi list,

i work on a server project similar to ServerSocket example and i have 
some questions

1) in example i see that there is the use of Tag property for the socket as

Public Sub MyServerSocket_Connection(sHost As String)
....
Obj.Tag = [$iId, 0, ""]
....
End Sub

i understand that
Tag[0] is the socket id
Tag[2] is the socket data

what is Tag[1];

2) it is used in sub Public Sub Socket_Write()  to send 10 times data to 
client,
why to send 10 times data? I dont understand it.

  iInd = hSocket.Tag[1]
   If iInd < 0 Then Return

   Do
     Inc iInd
     If iInd > 10 Then
       hSocket.Tag[1] = -1
       Return
     Endif
....
Try Print #hSocket, iInd & ":" & hSocket.Tag[2] & Space$(512) & "\n";
Loop

Thanks!

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to