diff --git a/client.go b/client.go index f432c50..349b5e9 100644 --- a/client.go +++ b/client.go @@ -183,7 +183,7 @@ func (c *Client) connectToServer(op secure.OperationTypeEnum, enc *gob.Encoder, startPacket := secure.PacketStartRequest{ OperationType: op, ClientName: "", - ProtocolVersion: "1.1", + ProtocolVersion: ProtocolVersion, AuthToken: c.authToken, } err := enc.Encode(startPacket) diff --git a/main.go b/main.go index 7aea834..e63f11f 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,8 @@ import ( var CurrentVersion = "v0.0.3" +const ProtocolVersion = "1.1" + type PasteValue struct { PasteRequired bool PasteNumber uint diff --git a/server.go b/server.go index 11f3fd0..055c9b5 100644 --- a/server.go +++ b/server.go @@ -105,10 +105,10 @@ func (s *Server) handleConnection(conn *net.TCPConn) { return } - // tell teh client the dealio + // tell the client if the connection is ok. startResponse := secure.PacketStartResponse{} - if start.ProtocolVersion != "1.1" { + if start.ProtocolVersion != ProtocolVersion { log.Errorf("bad protocol version") startResponse.Response = secure.PacketStartResponseEnumWrongProtocol enc.Encode(startResponse)