I made a little chat who work fine but when i added the flip command at the end it bugged the client app for a few seconds, why, please? cause i would like print the text i receive with teh text command....
Graphics 800,600,32,2 SetBuffer BackBuffer() s_new_user=LoadSound("menuSound/modem.wav") While Not KeyHit(1) acc=AcceptTCPStream(server) If acc<>0 Then PlaySound s_new_user u.user=New user u\stream=acc u\ip=DottedIP$(u\stream) u\nom=u\ip new_chat_line(u\ip,"Nouveau connecte "+CurrentTime$()) Else n_user=1 For u.user=Each user Text 500,n_user*13,u\nom n_user=n_user+1 If ReadAvail(u\stream)<>0 Then chat_line$=ReadLine$(u\stream) If Left$(chat_line,4)="nom=" Then u\nom=Right$(chat_line,Len(chat_line)-4) Else new_chat_line(u\nom,chat_line) EndIf ElseIf Eof(u\stream) Then new_chat_line(u\nom," viens de quiter") Delete u.user End If Text 530,0,"User="+(n_user-1) Next EndIf ;************* FLIP <----------- ????? Wend
