Done: https://github.com/akka/akka/issues/15945
Am Freitag, 19. September 2014 09:55:48 UTC+2 schrieb rkuhn: > > Yes, that is a good point (one of our “always-on” blind spots ;-) ): would > you please file a ticket? Even if it is possible to do so, we need to > validate that against the new stream-based API. > > Thanks, > > Roland > > 19 sep 2014 kl. 09:51 skrev rklaehn <[email protected] <javascript:>>: > > Hi All, > > I have been playing around with akka-http 0.7. I basically modified this > example > http://doc.akka.io/docs/akka-stream-and-http-experimental/0.4/scala/http-core-server.html > > from akka-http 0.4 with a FlowFrom and a custom request handler: > > val requestHandler: HttpRequest ⇒ Future[HttpResponse] = { > case _: HttpRequest ⇒ > Future.successful(HttpResponse(StatusCodes.NotFound, entity = "Unknown > resource!")) > } > > val bindingFuture = IO(Http) ? Http.Bind(interface = "0.0.0.0", port = > 8080) > bindingFuture foreach { > case Http.ServerBinding(localAddress, connectionStream) ⇒ > val flow = FlowFrom(connectionStream).map { > case Http.IncomingConnection(remoteAddress, requestProducer, > responseConsumer) ⇒ > println("accepted connection from " + remoteAddress) > > FlowFrom(requestProducer).mapFuture(requestHandler).publishTo(responseConsumer) > } > flow.consume() > case x => > println("not a server binding " + x) > } > > One thing I am currently not able to figure out is how to unbind an akka > http connection. There is no unbind message in the Http object like there > is in. Any pointers? > > Cheers, > > Rüdiger > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > > > > > *Dr. Roland Kuhn* > *Akka Tech Lead* > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/rolandkuhn> > > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
