Update to (minor) version 10.6.2. Added: websocket/Connection#OnPong and websocket/Connection#OnError(func(error)) instead of func(string) relative issues: https://github.com/kataras/iris/pull/988 and https://github.com/kataras/iris/issues/987 respectfully.

Former-commit-id: 76d4fda4ab4f34f8a251c8c2d5bb1ae7c3ef7047
This commit is contained in:
Gerasimos Maropoulos 2018-05-02 06:40:18 +03:00
parent d39a5b913d
commit 087c8c8b3a
11 changed files with 30 additions and 12 deletions

View File

@ -17,6 +17,11 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene
**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris` or let the automatic updater do that for you. **How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris` or let the automatic updater do that for you.
# Tu, 01 May 2018 | v10.6.2
- Websocket: added OnPong to Connection via PR: https://github.com/kataras/iris/pull/988
- Websocket: `OnError` accepts a `func(error)` now instead of `func(string)`, as requested at: https://github.com/kataras/iris/issues/987
# We, 25 April 2018 | v10.6.1 # We, 25 April 2018 | v10.6.1
- Re-implement the [BoltDB](https://github.com/coreos/bbolt) as built'n back-end storage for sessions(`sessiondb`) using the latest features: [/sessions/sessiondb/boltdb/database.go](sessions/sessiondb/boltdb/database.go), example can be found at [/_examples/sessions/database/boltdb/main.go](_examples/sessions/database/boltdb/main.go). - Re-implement the [BoltDB](https://github.com/coreos/bbolt) as built'n back-end storage for sessions(`sessiondb`) using the latest features: [/sessions/sessiondb/boltdb/database.go](sessions/sessiondb/boltdb/database.go), example can be found at [/_examples/sessions/database/boltdb/main.go](_examples/sessions/database/boltdb/main.go).

View File

@ -17,6 +17,10 @@
**Πώς να αναβαθμίσετε**: Ανοίξτε την γραμμή εντολών σας και εκτελέστε αυτήν την εντολή: `go get -u github.com/kataras/iris` ή αφήστε το αυτόματο updater να το κάνει αυτό για σας. **Πώς να αναβαθμίσετε**: Ανοίξτε την γραμμή εντολών σας και εκτελέστε αυτήν την εντολή: `go get -u github.com/kataras/iris` ή αφήστε το αυτόματο updater να το κάνει αυτό για σας.
# Tu, 01 May 2018 | v10.6.2
This history entry is not translated yet to the Greek language yet, please refer to the english version of the [HISTORY entry](https://github.com/kataras/iris/blob/master/HISTORY.md#tu-01-may-2018--v1062) instead.
# We, 25 April 2018 | v10.6.1 # We, 25 April 2018 | v10.6.1
This history entry is not translated yet to the Greek language yet, please refer to the english version of the [HISTORY entry](https://github.com/kataras/iris/blob/master/HISTORY.md#we-25-april-2018--v1061) instead. This history entry is not translated yet to the Greek language yet, please refer to the english version of the [HISTORY entry](https://github.com/kataras/iris/blob/master/HISTORY.md#we-25-april-2018--v1061) instead.

View File

@ -17,6 +17,10 @@
**如何升级**: 打开命令行执行以下命令: `go get -u github.com/kataras/iris` 或者等待自动更新。 **如何升级**: 打开命令行执行以下命令: `go get -u github.com/kataras/iris` 或者等待自动更新。
# Tu, 01 May 2018 | v10.6.2
This history entry is not translated yet to the Chinese language yet, please refer to the english version of the [HISTORY entry](https://github.com/kataras/iris/blob/master/HISTORY.md#tu-01-may-2018--v1062) instead.
# 2018 4月25日 | v10.6.1 版本更新 # 2018 4月25日 | v10.6.1 版本更新
- 用最新版 BoltDB 重新实现 session (`sessiondb`) 存储:[/sessions/sessiondb/boltdb/database.go](sessions/sessiondb/boltdb/database.go), 相关示例 [/_examples/sessions/database/boltdb/main.go](_examples/sessions/database/boltdb/main.go). - 用最新版 BoltDB 重新实现 session (`sessiondb`) 存储:[/sessions/sessiondb/boltdb/database.go](sessions/sessiondb/boltdb/database.go), 相关示例 [/_examples/sessions/database/boltdb/main.go](_examples/sessions/database/boltdb/main.go).

View File

@ -106,7 +106,7 @@ _Updated at: [Tuesday, 21 November 2017](_benchmarks/README_UNIX.md)_
## Support ## Support
- [HISTORY](HISTORY.md#we-25-april-2018--v1061) file is your best friend, it contains information about the latest features and changes - [HISTORY](HISTORY.md#tu-01-may-2018--v1062) file is your best friend, it contains information about the latest features and changes
- Did you happen to find a bug? Post it at [github issues](https://github.com/kataras/iris/issues) - Did you happen to find a bug? Post it at [github issues](https://github.com/kataras/iris/issues)
- Do you have any questions or need to speak with someone experienced to solve a problem at real-time? Join us to the [community chat](https://chat.iris-go.com) - Do you have any questions or need to speak with someone experienced to solve a problem at real-time? Join us to the [community chat](https://chat.iris-go.com)
- Complete our form-based user experience report by clicking [here](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link) - Complete our form-based user experience report by clicking [here](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link)

View File

@ -108,7 +108,7 @@ _Η τελευταία ενημέρωση έγινε την [Τρίτη, 21 Νο
## Υποστήριξη ## Υποστήριξη
- To [HISTORY](HISTORY_GR.md#we-25-april-2018--v1061) αρχείο είναι ο καλύτερος σας φίλος, περιέχει πληροφορίες σχετικά με τις τελευταίες λειτουργίες(features) και αλλαγές - To [HISTORY](HISTORY_GR.md#tu-01-may-2018--v1062) αρχείο είναι ο καλύτερος σας φίλος, περιέχει πληροφορίες σχετικά με τις τελευταίες λειτουργίες(features) και αλλαγές
- Μήπως τυχαίνει να βρήκατε κάποιο bug; Δημοσιεύστε το στα [github issues](https://github.com/kataras/iris/issues) - Μήπως τυχαίνει να βρήκατε κάποιο bug; Δημοσιεύστε το στα [github issues](https://github.com/kataras/iris/issues)
- Έχετε οποιεσδήποτε ερωτήσεις ή πρέπει να μιλήσετε με κάποιον έμπειρο για την επίλυση ενός προβλήματος σε πραγματικό χρόνο; Ελάτε μαζί μας στην [συνομιλία κοινότητας](https://chat.iris-go.com) - Έχετε οποιεσδήποτε ερωτήσεις ή πρέπει να μιλήσετε με κάποιον έμπειρο για την επίλυση ενός προβλήματος σε πραγματικό χρόνο; Ελάτε μαζί μας στην [συνομιλία κοινότητας](https://chat.iris-go.com)
- Συμπληρώστε την αναφορά εμπειρίας χρήστη κάνοντας κλικ [εδώ](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link) - Συμπληρώστε την αναφορά εμπειρίας χρήστη κάνοντας κλικ [εδώ](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link)

View File

@ -106,7 +106,7 @@ _Обновлено: [Вторник, 21 ноября 2017 г.](_benchmarks/READ
## Поддержка ## Поддержка
- Файл [HISTORY](HISTORY.md#we-25-april-2018--v1061) - ваш лучший друг, он содержит информацию о последних особенностях и всех изменениях - Файл [HISTORY](HISTORY.md#tu-01-may-2018--v1062) - ваш лучший друг, он содержит информацию о последних особенностях и всех изменениях
- Вы случайно обнаружили ошибку? Опубликуйте ее на [Github вопросы](https://github.com/kataras/iris/issues) - Вы случайно обнаружили ошибку? Опубликуйте ее на [Github вопросы](https://github.com/kataras/iris/issues)
- У Вас есть какие-либо вопросы или Вам нужно поговорить с кем-то, кто бы смог решить Вашу проблему в режиме реального времени? Присоединяйтесь к нам в [чате сообщества](https://chat.iris-go.com) - У Вас есть какие-либо вопросы или Вам нужно поговорить с кем-то, кто бы смог решить Вашу проблему в режиме реального времени? Присоединяйтесь к нам в [чате сообщества](https://chat.iris-go.com)
- Заполните наш отчет о пользовательском опыте на основе формы, нажав [здесь](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link) - Заполните наш отчет о пользовательском опыте на основе формы, нажав [здесь](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link)

View File

@ -102,7 +102,7 @@ _更新于: [2017年11月21日星期二](_benchmarks/README_UNIX.md)_
## 支持 ## 支持
- [更新记录](HISTORY_ZH.md#we-25-april-2018--v1061) 是您最好的朋友,它包含有关最新功能和更改的信息 - [更新记录](HISTORY_ZH.md#tu-01-may-2018--v1062) 是您最好的朋友,它包含有关最新功能和更改的信息
- 你碰巧找到了一个错误? 请提交 [github issues](https://github.com/kataras/iris/issues) - 你碰巧找到了一个错误? 请提交 [github issues](https://github.com/kataras/iris/issues)
- 您是否有任何疑问或需要与有经验的人士交谈以实时解决问题? [加入我们的聊天](https://chat.iris-go.com) - 您是否有任何疑问或需要与有经验的人士交谈以实时解决问题? [加入我们的聊天](https://chat.iris-go.com)
- [点击这里完成我们基于表单的用户体验报告](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link) - [点击这里完成我们基于表单的用户体验报告](https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link)

View File

@ -1 +1 @@
10.6.1:https://github.com/kataras/iris/blob/master/HISTORY.md#we-25-april-2018--v1061 10.6.2:https://github.com/kataras/iris/blob/master/HISTORY.md#tu-01-may-2018--v1062

View File

@ -13,7 +13,7 @@ import (
const ( const (
// Version is the string representation of the current local Iris Web Framework version. // Version is the string representation of the current local Iris Web Framework version.
Version = "10.6.1" Version = "10.6.2"
) )
// CheckForUpdates checks for any available updates // CheckForUpdates checks for any available updates

2
doc.go
View File

@ -35,7 +35,7 @@ Source code and other details for the project are available at GitHub:
Current Version Current Version
10.6.1 10.6.2
Installation Installation

View File

@ -125,7 +125,7 @@ type (
// (because websocket server automatically leaves from all joined rooms) // (because websocket server automatically leaves from all joined rooms)
LeaveRoomFunc func(roomName string) LeaveRoomFunc func(roomName string)
// ErrorFunc is the callback which fires whenever an error occurs // ErrorFunc is the callback which fires whenever an error occurs
ErrorFunc (func(string)) ErrorFunc (func(error))
// NativeMessageFunc is the callback for native websocket messages, receives one []byte parameter which is the raw client's message // NativeMessageFunc is the callback for native websocket messages, receives one []byte parameter which is the raw client's message
NativeMessageFunc func([]byte) NativeMessageFunc func([]byte)
// MessageFunc is the second argument to the Emitter's Emit functions. // MessageFunc is the second argument to the Emitter's Emit functions.
@ -172,7 +172,7 @@ type (
// FireOnError can be used to send a custom error message to the connection // FireOnError can be used to send a custom error message to the connection
// //
// It does nothing more than firing the OnError listeners. It doesn't send anything to the client. // It does nothing more than firing the OnError listeners. It doesn't send anything to the client.
FireOnError(errorMessage string) FireOnError(err error)
// To defines on what "room" (see Join) the server should send a message // To defines on what "room" (see Join) the server should send a message
// returns an Emmiter(`EmitMessage` & `Emit`) to send messages. // returns an Emmiter(`EmitMessage` & `Emit`) to send messages.
To(string) Emitter To(string) Emitter
@ -249,6 +249,11 @@ type (
var _ Connection = &connection{} var _ Connection = &connection{}
// CloseMessage denotes a close control message. The optional message
// payload contains a numeric code and text. Use the FormatCloseMessage
// function to format a close message payload.
//
// Use the `Connection#Disconnect` instead.
const CloseMessage = websocket.CloseMessage const CloseMessage = websocket.CloseMessage
func newConnection(ctx context.Context, s *Server, underlineConn UnderlineConnection, id string) *connection { func newConnection(ctx context.Context, s *Server, underlineConn UnderlineConnection, id string) *connection {
@ -395,7 +400,7 @@ func (c *connection) startReader() {
_, data, err := conn.ReadMessage() _, data, err := conn.ReadMessage()
if err != nil { if err != nil {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) { if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) {
c.FireOnError(err.Error()) c.FireOnError(err)
} }
break break
} else { } else {
@ -492,9 +497,9 @@ func (c *connection) OnPong(cb PongFunc) {
c.onPongListeners = append(c.onPongListeners, cb) c.onPongListeners = append(c.onPongListeners, cb)
} }
func (c *connection) FireOnError(errorMessage string) { func (c *connection) FireOnError(err error) {
for _, cb := range c.onErrorListeners { for _, cb := range c.onErrorListeners {
cb(errorMessage) cb(err)
} }
} }