Στις 12/6/2012 21:53, ο/η Benoît Minisini έγραψε:
> Le 10/06/2012 22:00, Demosthenes Koptsis a écrit :
>> 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];
> It is just a hack, to associate a counter with the socket.
>
>> 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.
> No reason. The example was used for testing the gb.net component. Maybe
> some cleanup is needed? :-)
>
The only reason i find is to have a Return way from Socket_Write().
It checks if the data were sent 10 times and then exit sub.

i changed this to check if data were sent 1 time and then exit sub.

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to