Page 1 of 1

Quick network question

Posted: Mon Dec 05, 2005 1:20 am
by Kaiser
How do I know if the connection was terminated from the server, without getting an error I can't catch about "ConnectionID is Null!"? or... how do I detect when ConnectionID becomes null so I can execute a CloseNetworkConnection?

Thanks in advance :D

Posted: Mon Dec 05, 2005 9:00 am
by Droopy
Search ClientEvent4 in this forum :wink:

Posted: Tue Dec 06, 2005 12:03 am
by Kaiser
Found this

viewtopic.php?p=113845&highlight=clientevent4#113845

But I can't understand it ... how am I suppossed to use that - if it's a whole FTP thing...? eh, I just need to check when the connection breaks... and I can't understand the code, 4 files, and I have no clue :? ...

Posted: Tue Dec 06, 2005 3:57 pm
by josku_x
Could this help?

Code: Select all

ConnectionID = OpenNetworkConnection(ServerName$, Port)

...
...

Closed = 0
Repeat
 If ConnectionID = 0
  CloseNetworkConnection(ConnectionID)
  Closed = 1
 EndIf
Until Closed = 1

Posted: Wed Dec 07, 2005 4:47 am
by Kaiser
I tried, but it seemed to have no effect... :?

Posted: Wed Dec 07, 2005 1:32 pm
by HeX0R

Posted: Wed Dec 07, 2005 10:10 pm
by Kaiser
Hey, that's AWESOME, just what I was looking for - and it works wonders. Thanks a lot you all! :D :D :D