Sign in to follow this  
Followers 0
Wb-FreeKill

Question about Au3xtra.dll

3 posts in this topic

#1 ·  Posted (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 by Wb-FreeKill

Share this post


Link to post
Share on other sites



umm anyone?

Share this post


Link to post
Share on other sites

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 to

Now 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 :)

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  
Followers 0