Commit graph

427 commits

Author SHA1 Message Date
Jerome Sautret 6e2ba9ca57 Remove context leak warnings 2019-12-26 15:51:19 +01:00
Jerome Sautret 600f7d5246 Merge branch 'master' of github.com:FluuxIO/go-xmpp 2019-12-26 15:06:14 +01:00
Jerome Sautret ab80709aeb Added xmpp_component2 example. 2019-12-26 15:05:34 +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
remicorniere e62b7fa0c7
Update client.go 2019-12-24 10:47:25 +00:00
remicorniere daf37cf5a8
Update Disconnect method on client
Remove wrong stanza sends
2019-12-24 10:44:01 +00:00
remicorniere ccc573c3b2
Update xmpp_chat_client.go
Quickfix : go back to menu when contacts are updated from server.
2019-12-23 09:25:39 +00:00
remicorniere 26114d40eb
Merge pull request #140 from remicorniere/Roster_Chat_Example
Added roster update to chat client example
2019-12-23 09:07:56 +00:00
CORNIERE Rémi f3252346c4 Added roster update to chat client example 2019-12-23 10:05:27 +01:00
remicorniere 3037bf6db8
Merge pull request #139 from remicorniere/IQ_Roster
Added Roster IQs
Added an overly primitive "disconnect" for the client to use in the chat client example
2019-12-23 08:12:26 +00:00
remicorniere f8f820170e
Merge branch 'master' into IQ_Roster 2019-12-23 08:09:39 +00: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
remicorniere 38f53642ba
Merge pull request #138 from remicorniere/Basic_Terminal_Client
Basic terminal client
2019-12-18 07:07:14 +00:00
CORNIERE Rémi c006990c20 Logging.
Added menus.
Can now send raw stanzas.
2019-12-18 07:59:23 +01:00
CORNIERE Rémi f0179ad90e Logging.
Added menus.
Can now send raw stanzas.
2019-12-18 02:16:46 +01:00
CORNIERE Rémi 1ba2add651 Example client with TUI 2019-12-16 01:42:27 +01:00
remicorniere 27130d7292
Merge pull request #135 from remicorniere/Error_Handling
Added callback to process errors after connection.
2019-12-12 14:51:00 +00:00
rcorniere 3c9b0db5b8 Fixed decoder usage.
Decoders have internal buffering, and creating many on a single TCP connection can cause issues in parsing exchanged XML documents.
2019-12-10 17:53:42 +01:00
rcorniere fd48f52f3d Using precisely sized buffers for tcp tests 2019-12-10 15:10:19 +01:00
rcorniere 1f5591f33a Merge branch 'Error_Handling' of github.com:remicorniere/go-xmpp into Error_Handling
# Conflicts:
#	client.go
#	client_test.go
#	tcp_server_mock.go
2019-12-10 12:45:58 +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 b74c0f0374
Merge pull request #136 from Crypho/eventmanager-status
Fix updating of EventManager.CurrentState
2019-12-09 15:30:53 +00:00
remicorniere 4f4e9f454f
Merge pull request #134 from Crypho/configurable-keepalive
Make keepalive interval configurable
2019-12-09 14:12:16 +00:00
Wichert Akkerman f41177775a Make keepalive interval configurable
This fixes #133
2019-12-09 14:06:31 +01:00
Wichert Akkerman f8c992a385 Fix updating of EventManager.CurrentState
The EventManager methods did not use a pointer as receiver, which
caused updated of CurrentState to be lost.
2019-12-09 12:30:37 +01:00
CORNIERE Rémi 5eff2d7623 Added callback to process errors after connection.
Added tests and refactored a bit.
2019-12-06 15:42:01 +01:00
rcorniere 6a3833b27d Removed last bits of codecov 2019-12-02 10:19:39 +01:00
remicorniere 51db430cff
Merge pull request #130 from remicorniere/master
Removed codeship and codecov. We now use github actions and coveralls.
2019-11-29 16:15:08 +00:00
rcorniere bfe2b7a30f Removed codeship and codecov. We now use github actions and coveralls. 2019-11-29 17:13:18 +01:00
remicorniere a95b53d9ad
Update with coveralls badge. Removed codecov badge 2019-11-29 16:37:23 +01:00
remicorniere 10078e2a1b
Merge pull request #124 from Crypho/github-ci
Setup GitHub actions to run tests
2019-11-29 15:18:01 +00:00
remicorniere 80ba790555
Added coverage
Should detect race conditions, use the same covermove as the current mode in test.sh, and update code coverage on the repo. 
See : https://github.com/marketplace/actions/coveralls-github-action
2019-11-29 15:56:27 +01:00
remicorniere c60edf4771
Added "-race" flag to tests run command
Kind of testing edits on someone else's PR too
2019-11-28 17:40:19 +01:00
Jerome Sautret 3b84cb796e Add 0.3.0 changelog 2019-11-28 17:39:10 +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
Wichert Akkerman 6f35ae4103 Fix triggers 2019-11-28 09:51:49 +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 1539e4f193 Setup GitHub actions to run tests 2019-11-05 14:20:12 +01:00
Mickael Remond 47976624c9
Preparing v0.2.0 Changelog before version release 2019-11-04 16:48:48 +01:00
Mickael Remond 4efde692a2
Add placeholder in README for routing packets and get IQ responses 2019-11-04 16:36:45 +01:00
Mickael Remond 08878ed4a2
Update go.sum file 2019-11-04 16:32:59 +01:00
Mickael Remond ce05c3226c
Fix failing tests 2019-11-04 16:32:29 +01:00
Mickael Remond 3e94880916
Merge branch 'master' of https://github.com/FluuxIO/go-xmpp 2019-11-04 16:25:07 +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 a0e74051fd Use a channel based API for SendIQ
This makes sending IQ more idiomatic Go, but more importantly it solves
a problem with contexts that were not being cancelled correctly with
the previous API.

As a side-effect of this change `Route.route` must now be invoked in a
go-routine to prevent deadlocks. This also allows for stanzas to be processed
in parallel, which can result in a nice performance win.
2019-11-04 16:22:05 +01:00
Wichert Akkerman 83bc8581fd Cleanup the IQ result route API
Simplify the API in several ways:

- provide the context to the IQ result handler, making it possible to pass in
  extra context and handle timeouts within the handler.
- pass the stanza in as an IQ type, removing the need to always type-cast it
  in the handler
- remove Router.HandleIqResult and Router.HandleFuncIqResult. Since the router
  is private to Client nobody would ever use these, and they do not really make
  things simpler anyway.
2019-11-04 16:22:05 +01:00
Wichert Akkerman 8088e3fa7e Add Client.SendIQ method 2019-11-04 16:22:05 +01:00
Wichert Akkerman 070934743f Add tests for iq result routes 2019-11-04 16:22:05 +01:00