have fun!
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Form1", 615, 227)
$Mainlist = GUICtrlCreateList("", -1, -1, 615, 227)
GUISetState()
Global $TCPAccept
TCPStartup()
$MainSocket = TCPListen(@IPAddress1, 1234)
_TCPAccept()
While 1
$TCPRecv = TCPRecv($TCPAccept, 9)
If @error Then
GUICtrlSetData($Mainlist, "")
_TCPAccept()
ContinueLoop
EndIf
If $TCPRecv <> "" Then GUICtrlSetData($Mainlist, $TCPRecv)
Sleep(100)
WEnd
Func _TCPAccept()
GUICtrlSetData($Mainlist, "Off")
Do
$TCPAccept = TCPAccept($MainSocket)
Until $TCPAccept <> -1
GUICtrlSetData($Mainlist, "")
EndFunc ;==>_TCPAccept