Age | Commit message (Collapse) | Author |
|
|
|
It used to be assumed that the user sets the LIMOX_USER and LIMOX_PWD
shell variables but there was no error checking if this was not the
case.
This commit adds the check preventing a crash of the whole program.
Furthermore an error message is printed to the terminal.
|
|
This is just internally used and thus has no benefit.
|
|
This explains better what this function is about.
|
|
|
|
|
|
|
|
With this commit the client starts the connection to the server as soon
as the user clicks into the application window. Disconnect or reading /
writing to the stream is not implemented.
|
|
Sadly there is no way to stop LimoX after connection. This has to be
fixed by a commit implementing a better control flow between GUI and
network part of the program.
|
|
This starts the XML stream via the XMPP connection.
|
|
This commit adds the functionality to actually connect to port 5222
(xmpp-client) of a XMPP server! This was tested using prosody and
verified via its systemd journal log entries.
|
|
The socket is needed for the TCP connection to the XMPP server.
|
|
The DNS resolution implemented with this commit uses getaddrinfo() from
the standard library to get an IPv4 address for the domainpart of the
user-given Jabber ID (JID).
This is by far not the process described in [RFC 6120][1]. This XMPP
core standard prefers SRV entry lookups. Taking A records like in this
implementation is referenced as "fallback process".
Furthermore this implementation just takes the first A record it finds
which could also be improved. It could for example be that IPv4 is
blocked in the referenced network and a AAAA IPv6 record is given and
functional. In this case this implementation would needlessly fail to connect.
[1]: https://www.rfc-editor.org/rfc/rfc6120
|
|
This should make the license more visible and prevent wrong usage.
|
|
This is not by far complete DNS handling but demonstrates that name
resolution works by printing the IP address type (IPv4 or IPv6) for each
found IP address.
|
|
The now legacy version of LimoX with GTK4 and libstrophe is now not part
of the main branch anymore. There might be a legacy branch keeping this
version at the time of reading.
This cut of implemented functionality is motivated by these reasons:
- Implementing XMPP is fun, educative and gives full control.
- Low level graphics with SDL2 is portable, fast, educative an mature.
- I do not have to use GLib and a crazy event loop anymore (run and hide)
|
|
It is mandatory to have an IP address to dial a TCP connection. FOr this
purpose the JID which is given by the user has to be converted into a
FQDN and then translated to an IP via DNS.
The function added with this commit implements this first part. The
extraction of the domain (more precisely the FQDN) from the JID.
|
|
|
|
It is currently evaluated if it is worth a trial to drop libstrophe as a
dependency and use a raw TCP connection and a XML library like expat to
implement the XMPP part. This would have the following advantages:
- fewer dependencies
- learning more about XMPP itself and less about libstrophe
- slower, but maybe easier implementation (XMPP doc is far more readable
/ extensive)
Because of these reasons the `limox_sdl2` version was switched to a
dummy XMPP implementation `xmpp.c` which acts now as a test field for
XMPP hacking.
|