src/Pure/Tools/server.scala
changeset 74094 6113f1db4342
parent 73702 7202e12cb324
child 74139 3314559ef095
equal deleted inserted replaced
74093:dc962d4248ca 74094:6113f1db4342
   126 
   126 
   127   abstract class Handler(port0: Int)
   127   abstract class Handler(port0: Int)
   128   {
   128   {
   129     val socket: ServerSocket = new ServerSocket(port0, 50, Server.localhost)
   129     val socket: ServerSocket = new ServerSocket(port0, 50, Server.localhost)
   130     def port: Int = socket.getLocalPort
   130     def port: Int = socket.getLocalPort
   131     val password: String = UUID.random_string()
   131     val password: String = UUID.random().toString
   132 
   132 
   133     override def toString: String = print(port, password)
   133     override def toString: String = print(port, password)
   134 
   134 
   135     def handle(connection: Server.Connection): Unit
   135     def handle(connection: Server.Connection): Unit
   136 
   136