just did it ... let's see if it fixes 90% of tasclient issuessomeone wrote:90% of all tasclients grumbles, issues, bugs, and complaints, can all be solved using code that can be written in a handful of lines
TASClient logon problems
Moderator: Moderators
Re: TASClient logon problems
Re: TASClient logon problems
added it to my tasclient and it broke ;_;AF wrote:Code: Select all
class CPingTask extends TimerTask { public CConnection c; public void run() { c.sendLine("PING"); } } Timer pingtask = new Timer(); CPingTask t = new CPingTask(); t.c = this; pingtask.schedule(t, 500, 8000);
Re: TASClient logon problems
Because you did it wrong I guess. But can't say much without the source.
You should synchronize the thread that sends ping, also check out TWSocket options (make sure it is not in some mode that doesn't allow concurrent access).
You should synchronize the thread that sends ping, also check out TWSocket options (make sure it is not in some mode that doesn't allow concurrent access).
Re: TASClient logon problems
tested in local when sending ping every 500ms while loading a mod or maps etc and the pings was received by the server