diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-12-30 22:06:33 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-12-30 22:06:33 (GMT) |
commit | 1a817c9f42dfbc4f3f80281e748a8a008b771533 (patch) | |
tree | d9cb929c15b77e81a001fdf76ee328d17c17e04a /src/helsinki.at/rhimportd | |
parent | b48b8d760021bd7a887a24c4bbd239f90c2c2f22 (diff) |
small improvement of socket handler test
Diffstat (limited to 'src/helsinki.at/rhimportd')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWebSocket.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWebSocket.go b/src/helsinki.at/rhimportd/ctrlWebSocket.go index 4c1bf45..7ceb9c4 100644 --- a/src/helsinki.at/rhimportd/ctrlWebSocket.go +++ b/src/helsinki.at/rhimportd/ctrlWebSocket.go @@ -110,7 +110,7 @@ func sendWebSocketResponse(ws *websocket.Conn, rd interface{}) { func sendWebSocketErrorResponse(ws *websocket.Conn, code int, err_str string) { rd := &webSocketResponseBaseData{} rd.ResponseCode = code - rd.Type = "ERROR" + rd.Type = "error" rd.ErrorString = err_str sendWebSocketResponse(ws, rd) } @@ -118,7 +118,7 @@ func sendWebSocketErrorResponse(ws *websocket.Conn, code int, err_str string) { func sendWebSocketAckResponse(ws *websocket.Conn, code int, id, refid string) { rd := &webSocketResponseBaseData{} rd.ResponseCode = code - rd.Type = "ACK" + rd.Type = "ack" rd.ErrorString = "OK" rd.Id = id rd.RefId = refid @@ -128,7 +128,7 @@ func sendWebSocketAckResponse(ws *websocket.Conn, code int, id, refid string) { func sendWebSocketListResponse(ws *websocket.Conn, sessions map[string]string) { rd := &webSocketResponseListData{} rd.ResponseCode = http.StatusOK - rd.Type = "LIST" + rd.Type = "list" rd.ErrorString = "OK" rd.Sessions = sessions sendWebSocketResponse(ws, rd) @@ -137,7 +137,7 @@ func sendWebSocketListResponse(ws *websocket.Conn, sessions map[string]string) { func sendWebSocketProgressResponse(ws *websocket.Conn, id, refid string, step int, step_name string, progress float64) { rd := &webSocketResponseProgressData{} rd.ResponseCode = http.StatusOK - rd.Type = "PROGRESS" + rd.Type = "progress" rd.ErrorString = "OK" rd.Id = id rd.RefId = refid @@ -150,7 +150,7 @@ func sendWebSocketProgressResponse(ws *websocket.Conn, id, refid string, step in func sendWebSocketDoneResponse(ws *websocket.Conn, code int, err_str, id, refid string, cart, cut uint) { rd := &webSocketResponseDoneData{} rd.ResponseCode = code - rd.Type = "DONE" + rd.Type = "done" rd.ErrorString = err_str rd.Id = id rd.RefId = refid |