summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2019-09-19 14:26:04 +0800
committerGitHub <noreply@github.com>2019-09-19 14:26:04 +0800
commit256b13462ff2a9bbaa6ba62a6c8014487388247e (patch)
treee17de9fe7cbe6170fdc7e78d5a7fddd3ee98e5d6
parent8f3daa0e811c76247bcaaa05ff82ff50f9af600d (diff)
downloadcask-lihaoyi-patch-1.tar.gz
cask-lihaoyi-patch-1.tar.bz2
cask-lihaoyi-patch-1.zip
Update WsClient.scalalihaoyi-patch-1
-rw-r--r--cask/util/src/cask/util/WsClient.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/cask/util/src/cask/util/WsClient.scala b/cask/util/src/cask/util/WsClient.scala
index 74f38e2..f15d7df 100644
--- a/cask/util/src/cask/util/WsClient.scala
+++ b/cask/util/src/cask/util/WsClient.scala
@@ -14,6 +14,8 @@ class WsClient(impl: WebsocketBase)
case Ws.Close(_, _) => impl.close()
case Ws.ChannelClosed() => impl.close()
}
+
+ def close(code: Int = 1005, reason: String = "") = this.send(Ws.Close(code, reason))
}
object WsClient{