2
0
mirror of https://github.com/FluuxIO/go-xmpp synced 2024-11-11 07:11:03 +00:00
Commit Graph

51 Commits

Author SHA1 Message Date
rcorniere
8798ff6fc1 - Changed IQ stanzas to pointer semantics
- Fixed commands from v 0.4.0 and tests
- Added primitive Result Sets support (XEP-0059)
2020-01-31 11:48:03 +01:00
remicorniere
94aceac802 Changed "Disconnect" to wait for the closing stream tag. (#141)
Updated example with a README.md and fixed some logs.
2019-12-26 14:47:02 +01:00
CORNIERE Rémi
390336b894 Added Roster IQs
Added an overly primitive "disconnect" for the client to use in the chat client example
2019-12-23 09:04:18 +01:00
CORNIERE Rémi
6d8e9d325a Try removing decoder from IQ tests and changing writing method 2019-12-09 16:32:33 +01:00
CORNIERE Rémi
e675e65a59 Added callback to process errors after connection.
Added tests and refactored a bit.
2019-12-09 16:32:33 +01:00
remicorniere
1822089db6 Tests for Component and code style fixes (#129)
* Tests for Component and code style fixes
2019-11-28 17:15:15 +01:00
remicorniere
7d89353156 Fix SIGSEGV in xmpp_component (#126)
* SIGSEGV in xmpp_component example with Prosody #126
2019-11-22 15:07:40 +01:00
Mickael Remond
6aa1e668ee
Fix issues after refactor
Relates to #126
2019-11-08 12:07:55 +01:00
Wichert Akkerman
eda5c23c54 Add SendIQ to StreamClient and Sender
This makes it possible to use SendIQ from PostConnect and route handlers.
2019-11-04 16:22:05 +01:00
Wichert Akkerman
33446ad0ba Create a new stream after StartTLS 2019-10-28 16:38:10 +01:00
Wichert Akkerman
92329b48e6 Transports need to handle open/close stanzas
XMPP and WebSocket transports require different open and close stanzas. To
handle this the responsibility handling those and creating the XML decoder is
moved to the Transport.
2019-10-28 16:38:10 +01:00
Wichert Akkerman
06a76160c8 Use transport factory function 2019-10-28 16:38:10 +01:00
Wichert Akkerman
7fa4b06705 Move address into transport config
This makes it possible to use a factory function to create a transport of the right type and not having to repeat the address when calling Transport.Connect()
2019-10-28 16:38:10 +01:00
Wichert Akkerman
e97d290e2b Use Transport in Component 2019-10-28 16:38:10 +01:00
Mickael Remond
8794ea6ed8
Check if we have a connection open before trying to close it
Fixes #22
2019-09-06 10:28:49 +02:00
Martin/Geno
7e596fc33c quick fix for component see #47 2019-09-06 09:27:38 +02:00
Martin/Geno
6005a964ba fix stream management for component + add test 2019-09-02 11:50:29 +02:00
Mickael Remond
3de99e0e0e Add initial support for stream management
For now it support enabling SM, replying to ack requests from server,
and trying resuming the session with existing Stream Management state.
2019-08-06 16:02:33 +02:00
Mickael Remond
428787d7ab
Refactor and move parsing and stanza to a separate package 2019-06-26 17:14:52 +02:00
Mickael Remond
445bb8efa3
Fix crash on send when disconnected
Fixes #74
2019-06-26 15:58:42 +02:00
Mickael Remond
d6d371df4d Do not export Router.route as it is not supposed to be called directly 2019-06-24 12:24:45 +02:00
genofire
d9fdff0839 Add constants (enumlike) for stanza types and simplify packet creation (#62)
* Add constants (enumlike) for stanza types
* NewIQ, NewMessage and NewPresence are now initialized with the Attrs struct
* Update examples
* Do not export backoff code. For now, we do not need to expose backoff in the documentation
* Make presence priority an int8
2019-06-22 11:13:33 +02:00
Mickael Remond
4d015e5b29
With go modules, we should be able to remove import comments 2019-06-18 16:28:30 +02:00
Mickael Remond
7aef8357ed Clean-up 2019-06-18 14:36:56 +02:00
Mickael Remond
2c7b03fcea Clean-up 2019-06-18 14:36:56 +02:00
Mickael Remond
61cdac89e0 Add support for generating delegation forwarded iq response 2019-06-18 14:36:56 +02:00
Mickael Remond
c6f0d03f60 Add support for delegation namespace packet parsing
Refactor and clean up pubsub & pep files
2019-06-18 14:36:56 +02:00
Mickael Remond
9db33d5792 Introduce Sender interface to abstract client sending in router handlers 2019-06-18 14:36:56 +02:00
Mickael Remond
b05e68c844 Add router to make it easier to set up routing info
- Using the router, the dispatch is not done anymore by receiving from
  receive channel, but by registering callback functions in routers,
  with matchers.
- Make IQPayload a real interface to make it easier to match namespaces.
- The StreamManager Run command is now blocking, waiting for StreamManager
  to terminate.
2019-06-18 14:36:56 +02:00
Mickael Remond
44568fcf2b
Remove dead code
For now the component is not able to handle the discovery requests on its own.
2019-06-10 15:06:41 +02:00
Mickael Remond
411619c2ef
Make channel type more specific (Packet instead of interface{})
Thanks to Genofire for spotting this
2019-06-10 10:58:41 +02:00
Mickael Remond
bc2fad6693 Let component handle discovery for now 2019-06-09 13:08:25 +02:00
Mickael Remond
909cf753c9 Fix missing default channel creation 2019-06-09 13:08:25 +02:00
Mickael Remond
83ae778d33 Return errors on SendRaw 2019-06-09 13:08:25 +02:00
Mickael Remond
6fc12e9779 Fix import and test 2019-06-09 13:08:25 +02:00
Mickael Remond
2d95ca9384 Simplify component writing and make it similar to client 2019-06-09 13:08:25 +02:00
Mickael Remond
54dfa60f12 Clean-up 2019-06-09 13:08:25 +02:00
Martin/Geno
757e339946
[BUGFIX] no pointer in type case in component 2019-05-31 13:46:57 +02:00
Mickael Remond
5eae7f4ef7
Move project to gosrc.io/xmpp
The URL will be more permanent as this is a place we dedicate as short URL for our go projects.
2018-12-26 18:50:01 +01:00
Mickael Remond
07b0d2d14d
Cleanup and add test for IOT control set parsing 2018-02-13 23:04:13 +01:00
Mickael Remond
ad6e09a0f6
Implements send / send raw 2018-01-26 09:55:39 +01:00
Mickael Remond
bdfd035bf3
Handshake minor refactor 2018-01-25 23:16:55 +01:00
Mickael Remond
fb8d050a00
IQ error management 2018-01-20 18:56:07 +01:00
Mickael Remond
993ca630f7
Test and code refactor 2018-01-17 18:47:34 +01:00
Mickael Remond
ff2da776d3
Basic test component (disco Info) 2018-01-14 16:54:12 +01:00
Mickael Remond
10219ec1e6
Refactor parsing / improve typing 2018-01-13 18:50:17 +01:00
Mickael Remond
24ac2c0526
Keeps component connection open 2018-01-12 19:08:47 +01:00
Mickael Remond
b21fee420f
Code clean-up 2018-01-12 18:14:41 +01:00
Mickael Remond
90865aeb8e
Adhoc test component can successfully connect to ejabberd 2018-01-12 18:01:27 +01:00
Mickael Remond
b31c29a03d
Implements dummy auth + stream error 2018-01-11 23:00:59 +01:00