Differences

This shows you the differences between two versions of the page.

Link to this comparison view

irc:1442095200 [2017/05/27 13:44]
irc:1442095200 [2017/05/27 13:44] (current)
Line 1: Line 1:
 +[07:57:40] *** ChanServ sets mode: +o temporalfox
 +
 +[10:53:16] *** ChanServ sets mode: +o purplefox
 +
 +[12:37:39] <​spriet2000>​ morning
 +
 +[12:40:57] <​spriet2000>​ i want to learn more about peer to peer programming
 +
 +[12:41:44] <​Ashe`>​ doesn'​t seem related to vert.x
 +
 +[12:41:49] <​spriet2000>​ vertx has a lot of network related stuff
 +
 +[12:45:13] <​spriet2000>​ but maybe you are right ..
 +
 +[12:47:14] <​Ashe`>​ dunno, what do you want to know exactly?
 +
 +[12:47:28] <​spriet2000>​ nothinh special thanks!
 +
 +[12:47:29] <​spriet2000> ​ :>
 +
 +[15:08:01] <​spriet2000>​ i have a question
 +
 +[15:08:10] <​spriet2000>​ vertx.createHttpServer(new HttpServerOptions().setPort(8080))
 +
 +[15:08:10] <​spriet2000> ​        ​.requestHandler(req -> {
 +
 +[15:08:10] <​spriet2000> ​            ​req.response().closeHandler(e -> logger.info("​test"​));​
 +
 +[15:08:10] <​spriet2000> ​            ​req.response().end("​EGH"​);​
 +
 +[15:08:10] <​spriet2000> ​            ​req.response().close();​
 +
 +[15:08:11] <​spriet2000> ​        ​}).listen();​
 +
 +[15:08:15] <​spriet2000>​ when i run this code
 +
 +[15:08:28] <​spriet2000>​ why i dont see the test log ?
 +
 +[15:09:17] <​spriet2000>​ i dont think the req.response().closeHandler is not handled
 +
 +[15:09:38] <​spriet2000>​ i am running 3.1.0-SNAPSHOT
 +
 +[15:10:05] <​spriet2000>​ the close handler should be executed right?
 +
 +[15:12:31] <​spriet2000>​ i think its on 3.0.0 too
 +
 +[15:12:54] <​AlexLehm>​ its probably using keep-alive?
 +
 +[15:13:08] <​spriet2000>​ is that default?
 +
 +[15:13:12] <​AlexLehm>​ i think so
 +
 +[15:13:14] <​spriet2000>​ ok
 +
 +[15:13:18] <​spriet2000>​ i will check
 +
 +[15:13:26] <​AlexLehm>​ you can set setKeepAlive(false) on the http server i think
 +
 +[15:14:50] <​AlexLehm>​ ah, its the close handler on the response, that is probably different
 +
 +[15:15:25] <​spriet2000>​ should be fired right?
 +
 +[15:16:21] <​spriet2000>​ req.endHandler is fired
 +
 +[15:16:32] <​spriet2000>​ but when is req.response().closeHandler fired?
 +
 +[15:18:16] <​spriet2000> ​   * Set a close handler for the response. This will be called if the underlying connection closes before the response
 +
 +[15:18:16] <​spriet2000> ​   * is complete.
 +
 +[15:18:52] <​spriet2000>​ i think i understood this method wrong
 +
 +[15:18:56] <​AlexLehm>​ probably when the client closes the connection without waiting for the response
 +
 +[15:19:04] <​spriet2000>​ exactly
 +
 +[15:19:09] <​spriet2000>​ oh well  :>
 +
 +[15:19:13] <​spriet2000>​ thanks Alex
 +
 +[15:19:14] <​AlexLehm>​ e.g. if the browser stops the download of the html
 +
 +[15:19:24] <​spriet2000>​ yea its clear to me
 +
 +[15:20:11] <​AlexLehm>​ you can probably create that with a netsocket client if you implement the http request and close the socket immediately
 +
 +[16:15:40] <​levin74>​ question on the event bus
 +
 +[16:16:08] <​levin74>​ suppose I have multiple "​producer verticles"​ producing events for a collection of "​receiver"​ verticles
 +
 +[16:16:13] <​levin74>​ using publish/​subscribe
 +
 +[16:16:30] <​levin74>​ question is: can I be sure that all receivers will get the events in the same order ?
 +
 +[16:17:00] <​levin74>​ like they'​ve managed using a sort of queue
 +
 +[16:17:23] <​levin74>​ or do different receiver get events in different orders ?
 +
 +[22:37:58] *** ChanServ sets mode: +o purplefox
 +
 +[23:05:30] <​BadApe>​ i noticed in the documentation,​ web docs don't talk about url parameters like about?​start=0,​limit=50 something like that
 +
 +[23:05:50] <​BadApe>​ i am sure it is wrong to use path parameters to do this
 +
 +[23:12:42] <​Ashe`>​ BadApe: params() has query parameters
 +
 +[23:13:28] <​Ashe`>​ (so getParam if you want a specific one)
 +
 +[23:14:50] <​BadApe>​ so something like router.get("/​product/:​id"​).handler(this::​getProduct);​ in getProduct routingContext.request().getParam("​id"​);​ and .getPara("​start"​)
 +
 +[23:15:05] <​BadApe>​ and start will be something that wasn't matched in the path
 +
 +[23:45:22] <​BadApe>​ static content doesn'​t seem to update if you change it without a restart, i set the setCachingEnabled to false, but no joy