Sponsored by: █ Sparkhost - Hosting Without Compromises! █ Hybrid Performance Web Hosting █ Spark Host Stream Hosting █ Hybrid IRC & IRCd Server Shell Accounts
Problem with Reverse Connection
Posted 26 May 2008 - 10:00 AM
If wsck.State <> sckConnected Then
wsck.Connect RemoteHost, RemotePort
And the code i have for the pause function is:
[codebox]Public Sub Pause(seconds)
Dim CurrentTime As Integer
CurrentTime = Timer
Loop Until CurrentTime + seconds <= Timer
I get an error on the line:
[code]CurrentTime = Timer[/code]
That says: Overflow
I'm not sure if this is the only problem because when i used Sleep(1000) the program didn't work at all.
Thanks in advance.
Posted 26 May 2008 - 10:19 AM
Where did u declare "Timer" ?
Damn i feel stupid. I defined that now as an integer, but it still wont connect, im not sure if the Pause function is even working. I just open both the client and server and wait for the connection message to be send but it doesn't, and i can't send commands from client to server either.
EDIT: I have done the timer part completely wrong, here is the code that it should be, from pscode.com
Public Sub Pause(seconds)Dim CurrentTimer As LongCurrentTimer = TimerDoIf CurrentTimer > Timer ThenCurrentTimer = CurrentTimer - 86400End IfDoEventsLoop Until CurrentTimer + Seconds <= TimerEnd Sub
I think the timer now works, it eats up a lot of CPU but it works, I just dont understand why the server still will not connect to the client, will someone tell me what is wrong with my code?
Posted 22 July 2008 - 01:51 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users