Wb-FreeKill 0 Posted April 10, 2005 (edited) Ive done some coding on Larry's Client/Server.. but ive messed something up. How do the client know when the server shutsdown? Like even when you shut the server down in task manager, the client says (Server disconnected).. how do it know? ;-------------------------------------------- ; Server Exit ;-------------------------------------------- If $ret[0] < 0 Then WinsetTitle($GUI,"Server Disconnected") EndIf When does $ret[0] become <0 ? Edited April 10, 2005 by Wb-FreeKill Share this post Link to post Share on other sites
TuMbLeWeEd 0 Posted April 11, 2005 umm anyone?<{POST_SNAPBACK}>Every call to the Au3Xtra.dll that fails return a value <0, meaning:$ret = DLLCall("au3xtra.dll","int","TCPRecv", "int", $socket, "str", "", "int", 512 )$socket = the socket you connected toNow when the server is down the TCP/IP protocol will close the socket and is no longer valid and the dll returns a value < 0 to let you know the server is down :-)Can be wrong, sounds logical to me My AutoIt stuffChatBichProjectSelectorWindow control grabberUsefull LinksPort forwarding with routers Share this post Link to post Share on other sites