mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.6.3.4'
This commit is contained in:
@@ -22,7 +22,9 @@ public class Http_long_poll_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_it
|
||||
public int Sleep_interval = 100;
|
||||
public int Send_interval = 1000;
|
||||
|
||||
public void Init_by_app(Xoa_app app) {}
|
||||
public void Init_by_app(Xoa_app app) {
|
||||
app.Gui__cbk_mgr().Reg(Xog_cbk_wkr__http.Instance);
|
||||
}
|
||||
public void Send_msg(String msg) {
|
||||
msgs.Add(msg);
|
||||
}
|
||||
@@ -42,7 +44,6 @@ public class Http_long_poll_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_it
|
||||
return String_.Concat_lines_nl(msgs.To_str_ary_and_clear());
|
||||
}
|
||||
|
||||
public byte[] Key() {return BRIDGE_KEY;}
|
||||
public static final byte[] BRIDGE_KEY = Bry_.new_a7("long_poll");
|
||||
public byte[] Key() {return BRIDGE_KEY;} private static final byte[] BRIDGE_KEY = Bry_.new_a7("long_poll");
|
||||
public static final Http_long_poll_cmd Instance = new Http_long_poll_cmd(); Http_long_poll_cmd() {}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,14 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*;
|
||||
import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*;
|
||||
import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*; import gplx.xowa.guis.cbks.swts.*;
|
||||
public class Xog_cbk_wkr__http implements Xog_cbk_wkr {
|
||||
public Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data) {return null;}
|
||||
private final Gfobj_wtr__json__browser json_wtr = new Gfobj_wtr__json__browser();
|
||||
public Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data) {
|
||||
String script = json_wtr.Write_as_func__drd(func, data);
|
||||
Http_long_poll_cmd.Instance.Send_msg(script);
|
||||
return null;
|
||||
}
|
||||
public void Send_prog(String head) {
|
||||
Http_long_poll_cmd.Instance.Send_msg(head);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user