admin.scala: Make `Connection' be its own publisher type.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 9 Jun 2018 12:21:29 +0000 (13:21 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 Jun 2018 13:00:09 +0000 (14:00 +0100)
admin.scala

index 56f1c30..fab8305 100644 (file)
@@ -92,6 +92,8 @@ class Connection(val in: Reader, val out: Writer)
   val jobmap = new HashMap[String, this.Job]; // Maps tags to extant jobs.
   var bgseq = 0;                       // Next background job tag.
 
+  type Pub = Connection;
+
   class Job extends Iterator[Seq[String]] {
     private[Connection] val ch = new Channel[JobMessage];
     private[this] var nextmsg: Option[JobMessage] = None;