Skip to content

Releases: kataras/neffos

v0.0.11

10 Dec 06:02
Compare
Choose a tag to compare
  • fix #20
  • give more respect to the Message.SetBinary
  • set Message.SetBinary for incoming messages using the operation code that the lower level protocol gave us

Relative: kataras/neffos.js@b5a916e

v0.0.10

10 Aug 16:14
Compare
Choose a tag to compare

Contains two fixes

  1. Fix Server.Broadcast call inside Server.OnConnect callback when Server.UseStackExchange is used.
  2. Add Server.SyncBroadcaster which, if set to true, changes the default behavior and sync Server.Broadcast calls when Server.StackExchange is nil (or Server.UseStackExchange is not used). When StackExchange is used then this field is ignored, published messages were correctly handled by Redis or Nats already.

v0.0.9

03 Aug 01:35
Compare
Choose a tag to compare

v0.0.8

19 Jul 08:58
Compare
Choose a tag to compare
  • Add On helper method on Events and Namespaces.
  • Make NSConn.JoinRoom and LeaveRoom to work synchronously inside event message handlers/callbacks.
  • Exports the Subject prefix of the stackexchange/nats.

v0.0.7

14 Jul 17:22
Compare
Choose a tag to compare
  • Add support for scaling-out using Nats with the stackexchange/nats subpackage, among with Redis from previous version.
  • Add support to register many StackExchanges.
  • Implement a Server.Ask which will block until/wait for a response from a specific client if msg.To is filled or from the first responder from either the cloud(if StackExchange is used) or from this server instance's connected clients, ofc you should still use the Conn.Ask if you know the client to ask from.
  • Update gobwas/ws dependency.

Commits log:

v0.0.6

11 Jul 03:01
Compare
Choose a tag to compare

Add support for scaling-out with 3 lines of code. A new interface type of StackExchange is created and it's used on server and server connections if registered through Server.StackExchange field. A built-in redis StackExchange using a lightweight library is available for use.

Example:

import "github.com/kataras/neffos/stackexchange/redis"
// [server := neffos.New...]

exc, err := redis.NewStackExchange(redis.Config{}, "MyChatApp")
if err != nil {
	// [...]
}
server.StackExchange = exc

Critical Commits:

Request by:

v0.0.5

09 Jul 09:46
Compare
Choose a tag to compare

Export the ability of custom ConnHandlers and a lot of improvements that allow external packages to interact with the (NewStruct) feature, an example of this is the Iris' new v11.2+ fully featured MVC websocket controller.

Minimum Go Installed required version is set to 1.12.

Critical commits:

v0.0.4

07 Jul 05:27
Compare
Choose a tag to compare
v0.0.4 Pre-release
Pre-release

Improvements of the neffos.NewStruct connection handler.

  • With the new EnableDebug(nil_or_custom_printer) the neffos.NewStruct will log which field is marked as static, which method is handling a specific event and etc.
  • A new method Events() neffos.Events is added to the return value of the neffos.NewStruct in order to handle that struct as raw neffos.Events - this adds support to wrap one or more "controllers" on a neffos.Namespaces or neffos.WithTimeout connection handler. Note that when Events() is used then its SetNamespace and SetTimeouts have no effect because they should be handled by the parent level instead.

Example Code:

var events = neffos.Namespaces{
    "ns1": neffos.NewStruct(new(myWebsocketController)).Events(),
    "ns2": neffos.Events{...},
}

Have fun!

v0.0.3

05 Jul 13:13
Compare
Choose a tag to compare
v0.0.3 Pre-release
Pre-release

Add a neffos.NewStruct to convert struct's methods to events. Read more at: https://github.com/kataras/neffos/wiki/Getting-started#using-a-struct-value

And add a customID string input argument to the neffos.Upgrade which iris is using to make it compatible. The neffos users can use the whole Server as a http.Handler through its ServeHTTP method ofc.

v0.0.2

30 Jun 19:58
Compare
Choose a tag to compare
v0.0.2 Pre-release
Pre-release