[Gambas-user] Server Socket Example
Demosthenes Koptsis
demosthenesk at ...626...
Sun Jun 10 22:00:01 CEST 2012
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!
More information about the User
mailing list