Commit Graph

25 Commits

Author SHA1 Message Date
Gerasimos (Makis) Maropoulos
946c100f7d use the same connection structure for both client and server-side connections interfaces, the 'Connection' interface could be changed to 'ServerConn' but this would produce breaking naming change to the iris users, so keep it as it's.
Former-commit-id: 3440871b368709e33d2d2a5080c66f7ad9338970
2019-02-10 17:16:43 +02:00
Gerasimos (Makis) Maropoulos
680b5a0923 websocket: replace sync.Map with custom map[string]*connection. Add translate template function example. Fix ctx.HandlerName() does not return the end-dev-defined current route's name, this will give better warnings when using MVC in a wrong way
Former-commit-id: 38fda8a20da9bc7665cdd209b7b367c1337dbd94
2019-01-25 23:47:31 +02:00
Gerasimos (Makis) Maropoulos
be32418bc1 Update to version 11.0.1. Feature request implemented: https://github.com/kataras/iris/issues/1113
Former-commit-id: 0ce38dbacc2458fe327fa4401fdde1e69c8aacb0
2018-10-28 01:19:22 +03:00
Eryx
1f1dfcca1c Fix panic error in concurrent calling with websocket.Connection.Emit()
Former-commit-id: 4c5cc222e9a43b18a86adb35bfafe4a278fd880e
2018-10-16 13:25:28 +08:00
Eryx
d2c3b90bc4 Fix panic error in concurrent calling with websocket.Connection.Emit()
Former-commit-id: b5d0ecd61547a297c320867af0a8abf208f0f743
2018-10-16 13:05:14 +08:00
Gerasimos (Makis) Maropoulos
cc679280ff fast-fix from prev commit
Former-commit-id: 3e1160018eb25cd844785fb951af0d31776df04c
2018-08-08 13:29:01 +03:00
Gerasimos (Makis) Maropoulos
51e1b44c72 websocket: use of sync.Map
Former-commit-id: 8ecb1e6f70380195ce916d4dfc3fe8d41c851995
2018-08-08 13:22:00 +03:00
Gerasimos Maropoulos
0db2afea93 websocket: fix a bug on emit on specific room when it doesn't exist it sends to all connections caused by a third-party contributor's PR...
Former-commit-id: de6fddadd7cef8537ad1d1aff1acd991e4cf99cf
2018-05-02 17:47:14 +03:00
Alexey McSakoff
6c9e3c69ff Handle non-WS connections in WS handler with no panic
Former-commit-id: f56665ee444bd16258edf6a34606efc132eced5a
2018-03-10 19:31:40 +04:00
Gerasimos (Makis) Maropoulos
e523d08cb1 add websocket/Connection#IsJoined as requested at https://github.com/kataras/iris/issues/895
Former-commit-id: 560fc8b911a9c1352be577d2f7bebd1fac7b5d4a
2018-02-03 18:53:39 +02:00
Gerasimos (Makis) Maropoulos
ade6809fc1 a simple simplify came from the previous PR that merged
Former-commit-id: 509d0ac8164562b655eebf0fe1fc8e166d8f0464
2018-01-05 08:22:18 +02:00
Akira Ho
5157ed17a6 websocket disconnect/leave-all-rooms should delete empty rooms as well otherwise rooms hash goes ever growing
Former-commit-id: 7f228be67cab79fc34f4a5a6a8b41b6ba8330186
2018-01-05 09:30:21 +08:00
Gerasimos (Makis) Maropoulos
2042fddb66 Another new feature: websocket controller, for real
Former-commit-id: c1a59b86733e890709b52446e22427a17d87f5fc
2017-12-20 17:56:28 +02:00
Gerasimos (Makis) Maropoulos
1cd9b70791 Some fixes to the previous edit
Former-commit-id: da5219084b60d820ced713feff837e3964fa1fb0
2017-10-22 00:41:04 +03:00
Gerasimos (Makis) Maropoulos
9061d3d695 Some changes for the benefit of performance for https://github.com/kataras/iris/pull/795
Former-commit-id: 4b2896381c78f35daaaf85d694c15e1cbdb78ac4
2017-10-22 00:33:05 +03:00
Gerson Alexander Pardo Gamez
6f1d1d2fea Websocket: added GetTotalConnections, GetConnections and GetConnection
Former-commit-id: fddddcdebd2a72ca082223bd29638a13ae6c0343
2017-10-21 15:44:36 -05:00
Gerson Alexander Pardo Gamez
732c9f70ed Websocket: replaced time.Ticker with sleep for avoid memory leak
Former-commit-id: f17706649faebe3020792e31de877c724be41057
2017-10-19 22:06:31 -05:00
hiveminded
e23f821341 fix websocket some times tries to emit to a disconnected client
Former-commit-id: 026798e6bc587c902bfc9f92281aced406d628a5
2017-08-09 13:31:56 +03:00
hiveminded
5855568794 grammar and readme additions 📕
Former-commit-id: f63083ed6924b4ed13ea9585501b0c032c1194c1
2017-07-28 13:58:02 +03:00
kataras
9f85b74fc9 Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded
Former-commit-id: da4f38eb9034daa49446df3ee529423b98f9b331
2017-07-10 18:32:42 +03:00
kataras
5e4b63acb2 Publish the new version ✈️ | Look description please!
# FAQ

### Looking for free support?

	http://support.iris-go.com
    https://kataras.rocket.chat/channel/iris

### Looking for previous versions?

    https://github.com/kataras/iris#version

### Should I upgrade my Iris?

Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.

**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).

### About our new home page
    http://iris-go.com

Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!

[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.

The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!

Read more at https://github.com/kataras/iris/blob/master/HISTORY.md


Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 23:22:52 +03:00
Gerasimos Maropoulos
675c0d510c Update to 4.0.0-alpha.3 - Response Engines, 'inject' the context.JSON/JSONP/Text/Data/Markdown/Render, Read HISTORY.md
## 4.0.0-alpha.2 -> 4.0.0-alpha.3

**New**

A **Response Engine** gives you the freedom to create/change the
render/response writer for

- `context.JSON`
- `context.JSONP`
- `context.XML`
- `context.Text`
- `context.Markdown`
- `context.Data`
- `context.Render("my_custom_type",mystructOrData{},
iris.RenderOptions{"gzip":false,"charset":"UTF-8"})`
- `context.MarkdownString`
- `iris.ResponseString(...)`

**Fix**
- https://github.com/kataras/iris/issues/294

**Small changes**

- `iris.Config.Charset`, before alpha.3 was `iris.Config.Rest.Charset` &
`iris.Config.Render.Template.Charset`, but you can override it at
runtime by passinth a map `iris.RenderOptions` on the `context.Render`
call .
- `iris.Config.IsDevelopment` , before alpha.1 was
`iris.Config.Render.Template.IsDevelopment`

**Websockets changes**

No need to import the `github.com/kataras/iris/websocket` to use the
`Connection` iteral, the websocket moved inside `kataras/iris` , now all
exported variables' names have the prefix of `Websocket`, so the old
`websocket.Connection` is now `iris.WebsocketConnection`.

Generally, no other changes on the 'frontend API', for response engines
examples and how you can register your own to add more features on
existing response engines or replace them, look
[here](https://github.com/iris-contrib/response).

**BAD SIDE**: E-Book is still pointing on the v3 release, but will be
updated soon.
2016-07-18 17:40:42 +03:00
Makis Maropoulos
0d482508fc Add ReadBufferSize and WriteBufferSize to the iris-ws, disable header copy also 2016-06-16 20:08:59 +03:00
Makis Maropoulos
d837381b16 Update to 3.0.0-rc.1 - Read the HISTORY.md. Relative: #183 #184 #166 #176 #181
Read https://github.com/kataras/iris/tree/master/HISTORY.md
2016-06-14 08:45:40 +03:00
Makis Maropoulos
c26668a489 Version 3.0.0-beta cleaned 2016-05-30 17:08:09 +03:00