Jump to content

TCP and While loop problem


Recommended Posts

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...