equal
deleted
inserted
replaced
171 |
171 |
172 private val in = new BufferedInputStream(socket.getInputStream) |
172 private val in = new BufferedInputStream(socket.getInputStream) |
173 private val out = new BufferedOutputStream(socket.getOutputStream) |
173 private val out = new BufferedOutputStream(socket.getOutputStream) |
174 private val out_lock: AnyRef = new Object |
174 private val out_lock: AnyRef = new Object |
175 |
175 |
176 def tty_loop(interrupt: Option[() => Unit] = None): TTY_Loop = |
176 def tty_loop(): TTY_Loop = |
177 new TTY_Loop( |
177 new TTY_Loop( |
178 new OutputStreamWriter(out), |
178 new OutputStreamWriter(out), |
179 new InputStreamReader(in), |
179 new InputStreamReader(in), |
180 writer_lock = out_lock, |
180 writer_lock = out_lock) |
181 interrupt = interrupt) |
|
182 |
181 |
183 def read_password(password: String): Boolean = |
182 def read_password(password: String): Boolean = |
184 try { Byte_Message.read_line(in).map(_.text) == Some(password) } |
183 try { Byte_Message.read_line(in).map(_.text) == Some(password) } |
185 catch { case _: IOException => false } |
184 catch { case _: IOException => false } |
186 |
185 |