Jump to content
Sign in to follow this  
Alexxander

TCP and While loop problem

Recommended Posts

Alexxander

hi

i had made 2 scripts server and clinet

part of server code

While 1
$accept = TCPAccept($socket)
$recive = TCPRecv($accept, 1000000)
If $recive = "hi" Then
_ArrayAdd($Array,$recive)
GUICtrlSetData($list, _ArrayToString($Array))
EndIf
WEnd

when im sending a tcp from the clint the data is viewd more than once in the list

for example when i send "hi" from the clinet it must make one item in the gui named list "hi"  but im gettign about 4 "hi" in the list

is thier is any way to only view one "hi" and never view it more than once ?

client

TCPStartup()

$socket = TCPConnect("192.168.1.111", 90)
TCPSend($socket, "hi")
Edited by Alexxander

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×