public static void SendResponse <T>(WebSocket webSocket, T commandData) where T : CommandDto { var response = new ServerSimpleResponse <T>(commandData); var responseBytes = response.ToByte(); SendByte(webSocket, responseBytes); }
public static void SendError(WebSocket webSocket, string errorMessage) { var errorResp = new ServerSimpleResponse <InfoDto>( "error", new InfoDto(errorMessage) ); SendByte(webSocket, errorResp.ToByte()); }
public static void SendSuccess(WebSocket webSocket) { var responseBytes = ServerSimpleResponse.SuccessNoData().ToByte(); SendByte(webSocket, responseBytes); }