Alexxander Posted August 17, 2013 Share Posted August 17, 2013 (edited) hi all this is the first script #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Form1", 708, 174, 192, 124) $mylist = GUICtrlCreateList("", 176, 32, 121, 97) GUISetState() TCPStartup() While 1 $TCPListen = TCPListen(@IPAddress1, 403) Do $TCPAccept = TCPAccept ($TCPListen) If GuiGetMsg() = $GUI_EVENT_CLOSE Then Exit Until $TCPAccept <> -1 Do If GuiGetMsg() = $GUI_EVENT_CLOSE Then Exit $TCPRecive = TCPRecv ($TCPAccept, 1000000) Until $TCPRecive <> "" GUICtrlSetData($mylist, $TCPRecive) If $TCPAccept = -1 then GUICtrlSetData($mylist, "") WEnd as u see what this script does that it wait for a tcp msg from another script on the same port then view it in a list. basicly it is working it is viewing what the other script sends but when i close the other script it still view i want it to delete what is recived from the othr script the the connection goes off here is the other script TCPStartup() $PCname = @ComputerName While 1 $TCPConnect = TCPConnect(@IPAddress1, 403) TCPSend ($TCPConnect, "hi") Sleep (1000) WEnd any ideas ? Edited August 17, 2013 by alexander95 Fixed tags Link to comment Share on other sites More sharing options...
FireFox Posted August 17, 2013 Share Posted August 17, 2013 Hi,You may take a look at the TCP examples in the beta helpfile to correctly use the TCP functions.To answer your question: Add an error check after the TCPRecv function.Br, FireFox. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now