Jump to content
Sign in to follow this  

Question about Au3xtra.dll

Recommended Posts

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")

When does $ret[0] become <0 ?

Edited by Wb-FreeKill

Share this post

Link to post
Share on other sites

umm anyone?


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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...