Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
Update protocol version to 1.2
Browse files Browse the repository at this point in the history
In the second protocol refinement revision several request error types
have received dedicated message types to avoid naming collisions
with user-defined error codes. The protocol is therefore no longer
considered backwards-compatible to the previous version.
  • Loading branch information
romshark committed Mar 19, 2018
1 parent 132698f commit 5c8eb2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/gorilla/websocket"
)

const supportedProtocolVersion = "1.1"
const supportedProtocolVersion = "1.2"

// Client represents an instance of one of the servers clients
type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion client/verifyProtocolVersion.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package client

// verifyProtocolVersion requests the endpoint metadata
import (
"encoding/json"
"fmt"
Expand All @@ -11,6 +10,7 @@ import (
"github.com/qbeon/webwire-go"
)

// verifyProtocolVersion requests the endpoint metadata
// to verify the server is running a supported protocol version
func (clt *Client) verifyProtocolVersion() error {
// Initialize HTTP client
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/gorilla/websocket"
)

const protocolVersion = "1.1"
const protocolVersion = "1.2"

// Hooks represents all callback hook functions
type Hooks struct {
Expand Down
2 changes: 1 addition & 1 deletion test/endpointMetadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// TestEndpointMetadata verifies the server endpoint provides correct metadata
func TestEndpointMetadata(t *testing.T) {
expectedVersion := "1.1"
expectedVersion := "1.2"

// Initialize webwire server
_, addr := setupServer(t, webwire.ServerOptions{})
Expand Down

0 comments on commit 5c8eb2d

Please sign in to comment.