2023-08-26 15:16:36 +00:00
|
|
|
extends Node
|
|
|
|
|
2023-08-26 17:59:43 +00:00
|
|
|
var _connection
|
|
|
|
|
|
|
|
func _service_discovery():
|
|
|
|
var iq := yield() as Xml.XmlElement
|
|
|
|
print(iq.as_string())
|
|
|
|
|
2023-08-26 15:16:36 +00:00
|
|
|
func _ready():
|
2023-08-26 17:59:43 +00:00
|
|
|
_connection = $Connections.establish_new_connection("poto.cafe", "veclavtalica", "-")
|
|
|
|
if _connection == null:
|
|
|
|
push_error("Connection failed")
|
|
|
|
|
|
|
|
if _connection.push_iq(_connection.domain, "get",
|
|
|
|
"<query xmlns='http://jabber.org/protocol/disco#items'/>",
|
|
|
|
_service_discovery()) != OK:
|
2023-08-26 15:16:36 +00:00
|
|
|
push_error("Connection failed")
|