diff --git a/src/main/scala/ch10/server.scala b/src/main/scala/ch10/server.scala index cf98883..6a05a5a 100644 --- a/src/main/scala/ch10/server.scala +++ b/src/main/scala/ch10/server.scala @@ -7,7 +7,7 @@ import stdlib.malloc, string.{strncpy, strlen} import collection.mutable import concurrent.{Future, ExecutionContext} -case class Request[T]( +case class Request[T]( // different than earlier chapters, type parameter T method: String, url: String, headers: Map[String, String], @@ -39,7 +39,7 @@ case class AsyncRoute( object Server extends Parsing: import ch07.LibUVConstants.*, ch07.LibUV.*, HttpParser.* - given ec: ExecutionContext = EventLoop + given ec: ExecutionContext = EventLoop // this is ch10's EventLoop, different val loop = EventLoop.loop var serial = 1L override val requests = mutable.Map[Long, RequestState]() diff --git a/src/main/scala/ch10/service.scala b/src/main/scala/ch10/service.scala index 3a76450..19d5370 100644 --- a/src/main/scala/ch10/service.scala +++ b/src/main/scala/ch10/service.scala @@ -16,7 +16,7 @@ def libuvService: Unit = .get("/"): r => OK(Map("message" -> s"got (routed) request $r")) .run(9999) - uv_run(EventLoop.loop, UV_RUN_DEFAULT) + uv_run(EventLoop.loop, UV_RUN_DEFAULT) // ch10's EventLoop, different than earlier chps. println("done") object ServiceHelpers: