Skip to content

Releases: rsms/gotalk

v1.1.4

17 Sep 15:48
Compare
Choose a tag to compare

Very minor update that makes it possible to use a zero Handlers struct instead of going through the NewHandlers function. This makes it easier to allocate Handlers for example as part of another, parent struct.

Example:

type MyThing struct {
  Gotalk gotalk.Handlers
  myOtherThing Thing
}
func main() {
  thing := MyThing{}
  thing.Gotalk.Handle("foo", ...)
  thing.Start()
}
func (m *MyThing) Start() {
  gotalk := gotalk.WebSocketHandler()
  gotalk.Handlers = &m.Gotalk
}

Prior to v1.1.4 you would have to do something like this instead, allocating a Handlers struct via the NewHandlers function:

type MyThing struct {
  Gotalk *gotalk.Handlers
  myOtherThing Thing
}
func NewMyThing() *MyThing {
  return &MyThing{ Gotalk: gotalk.NewHandlers() }
}
func main() {
  thing := NewMyThing()
  thing.Gotalk.Handle("foo", ...)
  thing.Start()
}
func (m *MyThing) Start() {
  gotalk := gotalk.WebSocketHandler()
  gotalk.Handlers = &m.Gotalk
}

v1.1.3

15 Sep 19:52
Compare
Choose a tag to compare

Improvements to the JavaScript library

gotalk.defaultResponderAddress can now be set to a partial URL, like a path or a hostname without protocol. Examples of acceptable values:

  • ws://host/path -- fully qualified. What was previously required.
  • //host/path -- match protocol script is served over (ws for http, wss for https)
  • /path -- automatic protocol and hostname script is served over/from

A warning message is now printed to the console when gotalk.developmentMode is true and connection to gotalk websocket server fails, with a helpful message about gotalk.defaultResponderAddress.

New property gotalk.developmentMode can be set to true to enable aforementioned warning message. It also enables console.error calls with full error information for handler exceptions and messaging errors. gotalk.developmentMode defaults to true when the script is served from localhost, otherwise its value is false by default.

v1.1.2

15 Sep 00:19
Compare
Choose a tag to compare

This release only contains improvements to the built-in JS library:

  • New version of JS library itself (see gotalk/js)
  • Simplified serving of the js file over HTTP, including some minor performance improvements
  • Delivers the js file with gzip compression if the HTTP client accepts it
  • No longer includes nor loads the large js.map file into memory

v1.1.1

14 Sep 02:28
Compare
Choose a tag to compare

Only metadata changes (readme and license), mainly for godoc/pkg.go.dev

v1.1.0

14 Sep 01:42
Compare
Choose a tag to compare
  • Exposes net.Listener on Server.Listener (previously private)
  • Adds ListenTLS and ListenTLSCustom functions for starting servers with TLS
  • Adds ConnectTLS and Sock.ConnectTLS functions for connecting with TLS
  • Adds Sock.ConnectReader function for connecting over any io.ReadWriteCloser
  • Adds Server.EnableUnixSocketGC convenience helper function
  • Adds TLSCertPool and TLSAddRootCerts functions for customizing default TLS config
  • Semantic change to UNIX socket transport: gotalk no longer installs a signal handler
    when listening over a UNIX socket using the function Listen("unix", ...).
    If you want to retain that functionality, explicitly call Server.EnableUnixSocketGC
    on the server returned by Listen("unix", ...).

v1.0.1

14 Sep 01:42
Compare
Choose a tag to compare
  • Adds Version constant (gotalk.Version string)

v1.0.0

14 Sep 01:42
Compare
Choose a tag to compare

Changelog start and first version as a go module