00:00:00  * ircretaryquit (Remote host closed the connection)
00:00:09  * ircretaryjoined
00:00:18  * c4miloquit (Remote host closed the connection)
00:01:41  * c4milojoined
00:06:29  * thlorenzquit (Remote host closed the connection)
00:09:58  * toothrotquit (Ping timeout: 240 seconds)
00:37:04  * avalanche123joined
00:41:44  * avalanche123quit (Ping timeout: 260 seconds)
00:43:38  * c4miloquit (Remote host closed the connection)
00:50:30  * calvinfojoined
00:58:00  * WalrusTrollquit (Quit: Leaving.)
00:58:39  * inolenquit (Quit: Leaving.)
01:08:19  * avalanche123joined
01:08:27  * avalanche123quit (Remote host closed the connection)
01:08:56  * avalanche123joined
01:12:23  * inolenjoined
01:12:42  * thlorenzjoined
01:12:58  * avalanche123quit (Ping timeout: 240 seconds)
01:20:08  * WalrusPonyjoined
01:25:32  * kazuponjoined
01:29:35  * TooTallNatequit (Quit: Computer has gone to sleep.)
01:29:58  * calvinfoquit (Quit: Leaving.)
01:33:14  * thlorenzquit (Remote host closed the connection)
01:38:39  * thlorenzjoined
01:39:44  * toothrotjoined
01:49:36  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:52:24  * thlorenzquit (Remote host closed the connection)
01:57:32  * calvinfojoined
02:04:47  * calvinfoquit (Quit: Leaving.)
02:15:59  * toothrotquit (Ping timeout: 256 seconds)
02:20:12  * inolenquit (Quit: Leaving.)
02:22:16  * toothrotjoined
02:26:14  * c4milojoined
02:28:13  * c4miloquit (Remote host closed the connection)
02:32:23  * c4milojoined
02:38:07  * kazuponquit (Read error: Connection timed out)
02:39:08  * kazuponjoined
02:42:14  * TooTallNatejoined
02:45:27  * c4miloquit (Remote host closed the connection)
02:50:54  * c4milojoined
03:13:28  * mikealjoined
03:14:41  * kazuponquit (Remote host closed the connection)
03:18:26  * inolenjoined
03:22:38  * inolenquit (Ping timeout: 240 seconds)
03:24:33  * toothrotquit (Ping timeout: 240 seconds)
03:51:42  * inolenjoined
03:56:16  * TooTallNatequit (Quit: Computer has gone to sleep.)
04:05:25  * kazuponjoined
04:11:43  * c4miloquit (Remote host closed the connection)
04:13:29  * c4milo_joined
04:17:58  * c4milo_quit (Ping timeout: 240 seconds)
04:18:08  * c4milojoined
04:22:17  * rmgjoined
04:23:22  * c4miloquit (Ping timeout: 264 seconds)
04:26:38  * rmgquit (Ping timeout: 240 seconds)
04:45:26  <indutny>morning saghul
04:46:32  * janjongboomjoined
04:49:00  * sh1mmerjoined
05:03:46  * thlorenzjoined
05:08:12  * thlorenzquit (Ping timeout: 260 seconds)
05:22:09  * kazuponquit (Read error: Connection timed out)
05:25:18  * kazuponjoined
05:42:37  * bajtosjoined
05:50:50  * rendarjoined
05:51:45  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:58:54  * bajtosquit (Quit: bajtos)
06:00:52  * calvinfojoined
06:02:45  * calvinfoquit (Client Quit)
06:28:10  * sh1mmerquit (Quit: Textual IRC Client: www.textualapp.com)
06:29:33  * kazuponquit (Ping timeout: 240 seconds)
06:30:52  * kazuponjoined
06:44:26  * dshaw_joined
06:50:24  * bajtosjoined
06:52:31  * bajtosquit (Client Quit)
07:05:02  * dshaw_quit (Quit: Leaving.)
07:13:11  * inolenquit (Quit: Leaving.)
07:24:21  * Left_Turnjoined
07:24:55  * inolenjoined
07:27:52  * dshaw_joined
07:36:54  * calvinfojoined
07:37:30  * Soarez|afkchanged nick to Soarez
07:42:31  * stagasjoined
07:50:08  * calvinfoquit (Quit: Leaving.)
07:50:21  * bajtosjoined
07:52:29  * yorkieneiljoined
07:54:39  * c4milojoined
07:57:09  * c4milo_joined
07:59:23  * c4miloquit (Ping timeout: 256 seconds)
08:01:18  * c4milo_quit (Ping timeout: 240 seconds)
08:24:12  * dshaw_quit (Quit: Leaving.)
08:54:32  * tellnesquit (Ping timeout: 260 seconds)
09:00:29  * tellnesjoined
09:03:50  * mikeal1joined
09:04:48  * mikealquit (Ping timeout: 260 seconds)
09:13:45  <rendar>if i have a tcp server with libuv, i have to close all clients connections before closing and exiting the server, right?
09:14:06  <indutny>yes
09:15:23  <rendar>indutny: hmm, but how to do that? i mean, do i have keep track of all the uv_tcp_t the server allocates when a client connects?
09:15:47  * yorkieneilquit (Quit: Lingo - http://www.lingoirc.com)
09:16:08  <indutny>if you want to close them all - yes
09:16:27  <indutny>libuv doesn't track them
09:17:20  <txdv>wtf
09:17:31  <txdv>why would you need to close all the clients before closing the listening socket?
09:17:37  <txdv>indutny: ?!?!?
09:17:58  <indutny>try programming plain C without libuv
09:18:04  <indutny>you'll need to do the same thing
09:18:15  <indutny>the server socket has no relation to the accepted sockets
09:18:19  <indutny>you could close it
09:18:20  <indutny>create new one
09:18:23  <indutny>and continue listening
09:18:33  <indutny>and clients won't even know that something changed
09:18:42  <rendar>yeah ^ i agree
09:19:00  <indutny>txdv: it is not necessary to close all the clients first
09:19:12  <indutny>txdv: it is just necessary if you want uv loop to exit by itself
09:19:32  <rendar>indutny: if i don't close all the clients, the uv_loop won't never exit, right?
09:19:54  <txdv>uv_run with the default paramter won't exit
09:19:55  <indutny>yeah, it'll exit only when all clients will be closed
09:20:15  <indutny>txdv: btw, I think you become quite aggressive recently
09:20:55  <indutny>nah :)
09:20:58  <indutny>its ok
09:21:53  * dshaw_joined
09:22:30  * dshaw_quit (Client Quit)
09:24:02  <txdv>indutny: no
09:24:13  <txdv>:>
09:24:17  <txdv>im just very direct with questions
09:24:22  <rendar>indutny: so to proper code a tcp server, the steps are: 1) keep track of all clients 2) when the server want to close, let's iterate ALL clients and close them with uv_close 3) wait for the uv_loop that will end soon, since clients are getting all closed -- right?
09:24:37  <indutny>yes
09:24:40  <indutny>this is totally correct
09:24:45  <indutny>but please be aware
09:25:02  <indutny>that uv_async_t and other stuff might be preventing loop from ending
09:25:17  <indutny>most likely it won't be a case for you
09:25:17  <rendar>right
09:25:18  <indutny>but anyway
09:25:37  <rendar>i was tempted to do just _exit(0); lol :-)
09:25:58  <txdv>on that regard, libuv has too many aborts
09:26:24  <rendar>txdv: you mean that will trigger many asserts which abort?
09:27:55  <txdv>lhttps://github.com/joyent/libuv/blob/master/src/fs-poll.c#L81-L82
09:28:01  <txdv>https://github.com/joyent/libuv/blob/master/src/fs-poll.c#L81-L82
09:28:04  <txdv>something like this
09:28:11  <txdv>instead of aborting it should just return an error code
09:28:26  <rendar>yeah, right
09:31:11  * c4milojoined
09:31:24  * nathan7quit (Ping timeout: 260 seconds)
09:31:33  <txdv>indutny: i'm not agressive, i'm not making any personal attacks
09:31:47  <indutny>yeah
09:31:48  <indutny>ok
09:31:55  <txdv>i'm using strong language sometimes, but only when i'm talking about my own code
09:32:01  <indutny>its ok
09:32:35  * nathan7joined
09:32:44  <indutny>don't take it too seriously :)
09:35:33  * c4miloquit (Ping timeout: 240 seconds)
09:36:11  * c4milojoined
09:36:56  * c4miloquit (Read error: Connection reset by peer)
09:37:27  <txdv>rendar: they rewrote git because it was doing a die on every corner
09:38:49  <rendar>txdv: what? git has been rewrote?
09:39:32  <rendar>from scratch?
09:40:25  <txdv>libgit2
09:40:45  <txdv>yeah from scratch
09:41:23  <rendar>didn't know
09:41:45  <txdv>just to make a reentrant library
09:41:56  <txdv>www.github.com/libgit2/
09:42:04  <txdv>pretty big undertaking
09:44:13  <indutny>what does it mean in this context
09:44:17  <indutny>reentrant
09:45:11  <txdv>that the library doesn't exit the program on failure
09:45:11  <rendar>yeah, nice question indutny
09:45:20  <indutny>txdv: ah, ok
09:45:23  <rendar>oh, that's it, i see
09:45:36  <txdv>but informs the programm that it has an error
09:45:41  <indutny>ok
09:45:42  <indutny>thanks
09:59:46  * inolenquit (Quit: Leaving.)
10:00:49  * bajtosquit (Quit: bajtos)
10:09:12  * a_lequit (Ping timeout: 260 seconds)
10:12:15  * seishunjoined
10:19:43  * a_lejoined
10:21:03  * tellnesquit (*.net *.split)
10:23:12  * kazupon_joined
10:25:03  * kazuponquit (Ping timeout: 240 seconds)
10:25:21  * kazupon_quit (Remote host closed the connection)
10:29:23  <rendar>indutny: btw, to our discussion of before, i would add that for every incoming tcp client, the server should keep track of them, for a later close, but this will mean a linked list of those clients, and since libuv may accepts connections by multiple threads, this means i have to provide an interlocked (e.g. with a mutex) linked list, right?
10:31:05  <indutny>no-no
10:31:18  <indutny>all that stuff is happening internally
10:31:21  <indutny>if happening at all :)
10:31:31  <indutny>you are using a single-threaded interface
10:31:33  * tellnesjoined
10:31:37  <indutny>and all callbacks are invoked in the same thread
10:31:39  <indutny>as uv_run()
10:37:05  <txdv>i wonder what he means by accepts connections by multiple threads
10:43:39  * mrvisserquit (Remote host closed the connection)
10:46:33  * stagasquit (Ping timeout: 256 seconds)
10:48:38  <rendar>indutny: i see
10:49:02  <rendar>txdv: accept() can be multithreaded
10:50:04  <rendar>txdv: 1 thread call accpet() on a tcp server socket, and receive say 36 new clients, meanwhile in some other thread, accept() is called on the *SAME* tcp server socket, and say 23 new clients are received, and so on
10:51:23  <rendar>indutny: i see, so i just need a linked list
10:52:36  <txdv>if you share that list between all threads
10:52:37  <txdv>yes
10:52:40  <txdv>but I wouldn't do that
10:53:22  <txdv>just use a list for every thread
10:53:27  <txdv>why would they need to be shared?
10:53:42  <txdv>libuvs original philosophy is never lock, never block
10:54:28  <indutny>txdv: hahaha
10:54:33  <indutny>gtg
10:54:33  <indutny>ttyl
10:54:48  * mrvisserjoined
10:56:21  <rendar>txdv: between all threads? indutny just said that "you are using a single-threaded interface" [with libuv]
11:01:00  <txdv>i'm giving up
11:05:53  <txdv>rendar: you can run two loops on two different threads, otherwise you wouldn't be able to use all cores on a cpu
11:06:07  <txdv>i thought your scenario described exactly that
11:06:34  <txdv>indutny: what is so funny about that statement? If you consider that node ultimatively does not have threads and libuv was written for node
11:20:43  <rendar>txdv: that's true, but libuv also uses threading internally
11:23:07  <txdv>when it has no other choice maybe
11:36:55  <txdv>i cann tell you that the linux epoll implementation doesn't use threads for sockets
11:43:15  * avalanche123joined
11:47:32  * avalanche123quit (Ping timeout: 240 seconds)
12:12:17  * shadi77joined
12:12:33  * mrvisserquit (Remote host closed the connection)
12:12:38  <shadi77>hello everybody!
12:13:09  <shadi77>i have a tool that does high number of conncurrent connections to a tcp server
12:13:16  <shadi77>the tool runs on windows
12:13:44  <shadi77>however am not able to run the tool more than few seconds
12:13:58  <shadi77>becz uv_read_start will start throwing ENOTCONN errors
12:14:17  <shadi77>due to the fact that ports are exausted because all ports are in TIME_WAIT state
12:14:45  <shadi77>i configured MaxUserPorts to the max. and reduced TcpDelayTimedWait to 30 seconds
12:14:45  <txdv>Do you have more than 64k connections open?
12:14:53  <shadi77>yet this is not going to be a solution
12:14:54  * toothrotjoined
12:15:18  <shadi77>actually i do open a connection, fire a request, and close the connection using uv_close()
12:15:33  <shadi77>after few seconds all connections are in TIME_WAIT state
12:15:54  <shadi77>i tried using SO_REUSEADDR option, however this is not working because all connections are taregtting the same host..
12:16:23  <shadi77>and as far as i recall, SO_REUSEADDR can reuse a port in TIME_WAIT state but not to the last used host
12:17:11  <shadi77>there is one option migth help which is using SO_LINGER to terminate the connection, however am trying to find a better solution
12:18:43  <txdv>so even if you are using close it will keep the sockets in the TIME_WAIT state?
12:18:50  <shadi77>yes
12:19:01  <shadi77>am using uv_close once i receive the response
12:19:19  <shadi77>and open a new connections
12:19:55  <shadi77>once i start getting ENOTCONN errors by then netstat shows all connections are in TIME_WAIT state
12:20:03  <shadi77>up to 64K
12:23:50  <txdv>can you write a test case and post it on the github issue tracker?
12:26:16  * mrvisserjoined
12:28:25  <shadi77>yes
12:28:49  <shadi77>is it something has to do with libuv?
12:28:56  <shadi77>i thought might not
12:31:02  <txdv>It's hard to tell if I can't use a test to check it
12:32:44  <shadi77>i understand
12:58:47  * toothrotquit (Ping timeout: 264 seconds)
13:11:30  * janjongboomjoined
13:17:24  * karupachanged nick to zz_karupa
13:17:37  * kazuponjoined
13:48:09  * itsananderson_joined
13:52:11  * itsanandersonquit (Ping timeout: 264 seconds)
13:52:25  * bajtosjoined
13:53:38  * AvianFlu_joined
13:54:05  * AvianFlu_changed nick to AvianFlu
14:18:47  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:24:38  * KiNgMaRquit (Ping timeout: 245 seconds)
14:29:44  * rmgjoined
14:32:14  * shadi77quit
14:36:21  * KiNgMaRjoined
14:42:30  * a_lequit (Remote host closed the connection)
14:57:33  * KiNgMaRquit (Ping timeout: 245 seconds)
15:02:26  * a_lejoined
15:04:02  * Soarezchanged nick to Soarez|afk
15:07:17  * a_lequit (Remote host closed the connection)
15:07:56  * a_lejoined
15:08:05  * Soarez|afkchanged nick to Soarez
15:17:25  * KiNgMaRjoined
15:24:18  * bajtosquit (Quit: bajtos)
15:27:40  * mikeal1quit (Quit: Leaving.)
15:32:53  * mrvisserquit (Remote host closed the connection)
15:38:10  * kenperkinsquit (Quit: Computer has gone to sleep.)
15:49:02  * bajtosjoined
15:57:15  * a_lequit (Remote host closed the connection)
15:58:10  * itsananderson_quit (Ping timeout: 264 seconds)
15:58:26  * kazuponquit (Remote host closed the connection)
15:59:46  * kazuponjoined
16:09:33  * kazuponquit (Remote host closed the connection)
16:11:10  * kazuponjoined
16:12:14  * avalanche123joined
16:15:32  * kazuponquit (Ping timeout: 260 seconds)
16:16:03  * piscisaureusjoined
16:16:05  * dap_joined
16:16:15  * TooTallNatejoined
16:22:14  * mrvisserjoined
16:22:37  * Ralithquit (Ping timeout: 240 seconds)
16:35:38  * rmgquit (Remote host closed the connection)
16:40:20  * calvinfojoined
16:41:00  * itsanandersonjoined
16:45:08  * itsanandersonquit (Ping timeout: 240 seconds)
16:48:44  * kenperkinsjoined
16:52:31  * kenperkinsquit (Client Quit)
17:04:02  * inolenjoined
17:04:44  * avalanche123quit (Remote host closed the connection)
17:06:32  * avalanch_joined
17:08:31  * a_lejoined
17:08:41  * a_lequit (Remote host closed the connection)
17:08:58  * a_lejoined
17:11:34  * c4milo_joined
17:12:19  * itsanandersonjoined
17:12:35  * rmgjoined
17:14:45  * kenperkinsjoined
17:16:00  * brsonjoined
17:16:20  * itsanandersonquit (Ping timeout: 240 seconds)
17:19:46  * kenperkinsquit (Quit: Computer has gone to sleep.)
17:25:29  * kenperkinsjoined
17:29:16  * kenperkinsquit (Read error: Connection reset by peer)
17:30:00  * kenperkinsjoined
17:36:06  * Ralithjoined
17:44:01  * kenperkinsquit (Quit: Computer has gone to sleep.)
17:45:01  * rendarquit (Ping timeout: 240 seconds)
17:48:38  * itsanandersonjoined
17:50:15  * Soarezchanged nick to Soarez|afk
17:51:05  * Soarez|afkchanged nick to Soarez
17:51:48  * rendarjoined
17:56:39  * kenperkinsjoined
17:57:56  * kenperkinsquit (Read error: Connection reset by peer)
17:58:04  * kenperkins_joined
18:06:15  * kenperkins_quit (Quit: Computer has gone to sleep.)
18:10:21  * Soarezchanged nick to Soarez|afk
18:14:20  * jcrugzzjoined
18:16:56  * mrvisserquit (Remote host closed the connection)
18:19:33  * calvinfoquit (Quit: Leaving.)
18:19:52  * calvinfojoined
18:20:08  * calvinfoquit (Client Quit)
18:20:29  * calvinfojoined
18:33:28  * a_lequit (Read error: Connection reset by peer)
18:35:07  <jcrugzz>trevnorris: you around?
18:38:20  * Soarez|afkchanged nick to Soarez
18:40:25  * c4milo_quit (Remote host closed the connection)
18:41:01  * c4milojoined
18:43:45  * kenperkinsjoined
18:43:55  * janjongboomjoined
18:44:14  * Soarezchanged nick to Soarez|afk
18:45:25  * c4miloquit (Ping timeout: 240 seconds)
18:50:39  * mrvisserjoined
18:51:22  * txdvquit (Read error: Connection reset by peer)
18:51:50  * txdvjoined
19:02:34  * calvinfoquit (Quit: Leaving.)
19:03:21  * a_lejoined
19:06:15  * mrvisserquit (Remote host closed the connection)
19:10:47  * c4milojoined
19:24:28  * kenperkinsquit (Remote host closed the connection)
19:27:36  * calvinfojoined
19:28:18  * sh1mmerjoined
19:28:25  * calvinfoquit (Client Quit)
19:30:01  * calvinfojoined
19:30:18  * petka_joined
19:55:26  * kenperkinsjoined
20:01:23  * dshaw_joined
20:09:04  * tensedujoined
20:10:05  * tenseduquit
20:11:14  * kazuponjoined
20:12:42  * kazuponquit (Read error: Connection reset by peer)
20:13:02  * kazuponjoined
20:18:35  * kazuponquit (Ping timeout: 264 seconds)
20:20:55  * yunongjoined
20:24:19  * daviddiasjoined
20:24:32  * daviddiasquit (Client Quit)
20:32:10  * avalanch_quit (Remote host closed the connection)
20:32:40  * avalanche123joined
20:33:09  * avalanche123quit (Read error: Connection reset by peer)
20:33:27  * avalanche123joined
20:38:01  * avalanche123quit (Ping timeout: 272 seconds)
20:39:23  * c4miloquit (Remote host closed the connection)
20:46:49  * avalanche123joined
20:52:33  * bajtosquit (Quit: bajtos)
20:58:58  * mikealjoined
21:05:56  * yunongquit
21:06:09  * yunongjoined
21:08:51  * mikealquit (Quit: Leaving.)
21:11:54  * mrvisserjoined
21:12:07  * kazuponjoined
21:18:18  * kazuponquit (Ping timeout: 240 seconds)
21:27:35  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:28:43  * janjongboomjoined
21:30:32  * AvianFluquit (Remote host closed the connection)
21:34:01  * janjongboomquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:35:32  * seishunquit (Ping timeout: 240 seconds)
21:40:37  * mrvisserquit (Remote host closed the connection)
21:54:29  * thlorenzjoined
21:55:11  * piscisaureusquit (Ping timeout: 264 seconds)
21:59:11  * thlorenzquit (Ping timeout: 256 seconds)
22:01:02  * mrvisserjoined
22:01:51  * c4milojoined
22:02:07  * toothrotjoined
22:06:13  * c4miloquit (Ping timeout: 240 seconds)
22:10:12  * kazuponjoined
22:14:55  * kazuponquit (Ping timeout: 272 seconds)
22:42:32  * mrvisserquit (Remote host closed the connection)
22:51:56  * Soarez|afkchanged nick to Soarez
22:56:01  * rendarquit
23:04:25  * Soarezchanged nick to Soarez|afk
23:09:04  * AvianFlujoined
23:10:11  * brsonquit (Ping timeout: 264 seconds)
23:11:17  * c4milojoined
23:14:34  * piscisaureusjoined
23:20:45  * kazuponjoined
23:23:58  * mrvisserjoined
23:25:20  * kazuponquit (Ping timeout: 260 seconds)
23:46:13  * dshaw_quit (Quit: Leaving.)