Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ How can I reconnect with code
How can I reconnect with code
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Tianxz
(30 posts) Bio
|
Date
| Thu 20 May 2010 03:25 PM (UTC) |
Message
| The code can't reconnect:
$world->Execute('quit');
$world->connect();
How can I revise it. | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #1 on Thu 20 May 2010 06:24 PM (UTC) |
Message
| It's Connect, not connect. Function names are case sensitive. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #2 on Thu 20 May 2010 08:47 PM (UTC) |
Message
| Your first line sends a quit command to the MUD. Then, before the MUD has a chance to do anything you reconnect.
TCP/IP is a stream protocol. Things take time. For example, it might take half a second for your command to reach the MUD, another half second for it to process it, and another half second for the disconnection to reach the client.
What you really want to do is quit, and then have a "reconnector" script that reconnects if it happens to get disconnected. There are some plugins that do that. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,407 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top