[00:01:31] tereay has quit: Remote host closed the connection
[00:02:53] Arutha_ has quit: Ping timeout: 240 seconds
[00:05:22] Baldur has quit: Remote host closed the connection
[00:26:19] <azaghal> Hm... How about this:
[00:27:06] <azaghal> The Tcp server creates a shared pointer to io_service only for connections (it uses separate io_service for itself - acceptor).
[00:27:51] <azaghal> Each Tcp connection class created has a shared pointer to the above io_service.
[00:29:01] <azaghal> Gah, damn...
[00:29:05] <azaghal> Just ran into...
[00:29:06] <azaghal> Hm...
[00:29:11] <azaghal> Need to think this over tomorrow :)
[00:36:29] <azaghal> Ok, maybe I got it finally.
[00:41:47] <azaghal> Night all ;)
[00:51:18] caedes has quit: Remote host closed the connection
[01:38:41] loufoque_ has quit: Remote host closed the connection
[04:14:47] amogorkon has quit: Read error: Connection reset by peer
[06:34:41] <needle> good morning
[06:36:13] <sueastside> heya needle
[06:42:25] arpu has quit: Ping timeout: 260 seconds
[07:06:01] <needle> sueastside: has any1 ever build a static pt client?
[07:07:15] <needle> not that me tries to do the "undoable"
[07:07:18] <needle> :D
[07:40:24] <Tucos> morning
[07:43:09] needle has quit: Ping timeout: 245 seconds
[07:44:15] TheAncientGoat has joined #peragro
[07:45:07] needle has joined #peragro
[08:09:58] XilliX has quit: Quit: I am impatient for things to improve, do more, complain less.
[08:40:21] LinDon|afk has joined #peragro
[08:50:23] <azaghal> Morning
[08:56:27] <sueastside> needle: yes
[08:56:32] <sueastside> morning Tucos azaghal
[08:56:45] <Tucos> hey sueastside
[08:58:11] <Tucos> guess i'll go and do something ... stupid practicals :p
[08:59:25] <sueastside> Tucos: something?
[09:12:36] |Arerano| has joined #peragro
[09:12:36] * circeavalon pokes sueastside
[10:22:44] circeavalon has quit: Quit: peace out
[10:58:49] Baldur has joined #peragro
[11:04:13] <Tucos> sueastside: yeah, something, still haven't figured out what though .. a minute ago i have printed one page \o/
[11:21:19] loufoque_ has joined #peragro
[11:58:34] arpu has joined #peragro
[12:13:43] TheAncientGoat has quit: Read error: Connection reset by peer
[12:28:17] <azaghal> Heading off to buy the running stuff ;)
[12:28:41] <sueastside> run azaghal run!
[12:29:00] <azaghal> sueastside: I'm not stupid... Just fat...
[12:29:52] <sueastside> azaghal: him not stupid, him eat box chocolates
[12:30:11] <azaghal> Actually, yes
[12:57:14] amogorkon has joined #peragro
[16:30:49] arpu has quit: Read error: Operation timed out
[16:31:41] arpu has joined #peragro
[16:53:12] TheAncientGoat has joined #peragro
[17:03:41] |Arerano| has quit: Ping timeout: 264 seconds
[17:07:26] |Arerano| has joined #peragro
[17:09:57] tereay has joined #peragro
[17:25:53] Baldur has quit: Quit: ChatZilla 0.9.86 [Firefox 3.6.3/20100401080539]
[18:12:24] azaghal has quit: Quit: Lost terminal
[18:24:13] grendel28 has quit: Quit: grendel28
[18:47:45] |Arerano| has quit: Ping timeout: 240 seconds
[19:01:28] <Tucos> \o
[19:15:20] Arerano_Areramau has joined #peragro
[19:25:35] azaghal has joined #peragro
[19:25:35] ChanServ sets mode: +o azaghal
[19:26:14] <azaghal> Back
[19:32:53] <Tucos> wb
[19:33:36] <azaghal> Thanks
[20:04:39] needle has quit: Ping timeout: 248 seconds
[20:06:10] needle has joined #peragro
[20:32:29] Baldur has joined #peragro
[20:45:00] circeavalon has joined #peragro
[20:45:43] * circeavalon pokes sueastside
[21:40:39] <azaghal> sueastside: Are you around?
[21:52:11] Vornne has quit: Ping timeout: 265 seconds
[21:53:42] Vornne has joined #peragro
[21:53:43] ChanServ sets mode: +o Vornne
[21:56:54] <azaghal> Vornne: Yo
[22:11:26] <azaghal> I'll post a proposal on how Tcp server/client should function.
[22:11:35] <Tucos> :o
[22:11:54] <azaghal> The Tcp server contains an instance of io_service which is used internally for its own purpose for accepting the messages.
[22:12:19] <azaghal> Additionally, it contains a thread object used for its own calls to personal io_service::run() method.
[22:12:35] <azaghal> It also sports a shared pointer to a thread instance which will be used by Tcp connections.
[22:12:54] <azaghal> Tcp server has a shard pointer to io_service for Tcp connections.
[22:13:40] <azaghal> The Tcp server creates an instance of Tcp connection, initialising it with the connection thread shared pointer and shared pointer to io_service.
[22:13:57] <azaghal> Upon accepting the connection, it starts the Tcp connection by calling its Start()
[22:14:00] <azaghal> method
[22:14:36] <azaghal> Tcp connection has a shared pointer to io_service as well as thread (passed on by the Tcp server).
[22:14:47] <azaghal> Upon starting the connection, the following happens:
[22:17:35] <azaghal> Oh, the Tcp connection _also_ creates a boost::asio::io_service::work object that gets initialised with Tcp connection io_service.
[22:17:46] <azaghal> Ok, to continue what happens in start:
[22:18:36] <azaghal> Lock the mutex for thread. Check if the thread is running. If not, create new thread and assign it, letting it run io_service::run()
[22:19:14] <azaghal> After that unlock the mutex, and start the handlers for receiving data.
[22:19:37] <azaghal> Oh, this is all using strands too, which gets created (shared pointer to) in Tcp server, and also passed to each connection constructor.
[22:20:16] <azaghal> Now, why am I trying to do it this way?
[22:20:32] <azaghal> Basically, I want the Start() calls to server/connection to be non-blocking.
[22:20:49] <azaghal> So I need to use a thread for running the io_service::run() method.
[22:20:49] <azaghal> _But_
[22:21:06] <azaghal> I want to be able to stop the Server without affecting the connections (for whatever sick purpose).
[22:21:27] <azaghal> So that's why I introduce two io_service objects - one for server, the other for connections initiated by that server.
[22:22:03] <azaghal> Now, the issue is _how_ to run the io_service::run() method for connections.
[22:22:13] <azaghal> And how to make sure it won't exit as long as it has work.
[22:22:28] <azaghal> And restart it in case new connections get started.
[22:22:41] <azaghal> But keeping it all kind of dynamical so it can stop processing etc if it's not needed.
[22:24:19] <azaghal> So, the main question is - am I making sense here?
[22:25:23] <azaghal> Another thing I'm thinking of is implementing an additional constructor for when you have simply a single Tcp connection where the constructor is the one which instantiates the thread/io_service/strand instance.
[22:25:29] <azaghal> s/instance/class/
[22:25:49] <azaghal> (in order to have something which can function without the Tcp server instance)
[22:48:44] TheAncientGoat has quit: Ping timeout: 265 seconds
[22:52:57] * azaghal beats Vornne and sueastside with a club in the head
[22:53:28] tereay has quit: Remote host closed the connection
[23:45:56] loufoque_ has quit: Remote host closed the connection
[23:47:51] <Tucos> got anything for me to do? ^^
[23:50:35] * Tucos pokes azaghal
[23:50:57] Deepa has joined #peragro
[23:51:00] <azaghal> Learn Python for what sueastside needs?
[23:51:02] <azaghal> Deepa: Yo!
[23:51:05] <Deepa> Yo
[23:51:11] <Tucos> already did, what did sueastside need? :p
[23:51:12] <Deepa> I heard there was Python and depression going on
[23:51:47] <azaghal> Tucos: Heheh, no idea. He should know :)
[23:51:57] <azaghal> Back to watching BSG
[23:51:59] <Tucos> 't was something with pysvn .. but don't remember the details xD
[23:52:05] <Tucos> oh well ... i'll go off to bed
[23:52:10] <Tucos> hope i'll feel better tomorrow
[23:53:37] <Deepa> Also I'm back now
[23:53:39] <Deepa> But I may die
[23:54:01] <Tucos> \o/
[23:54:13] <Tucos> we'll just put you in a bag and never open it :)
[23:54:41] <Deepa> Don't worry, I'll be quite compact
[23:54:44] <Deepa> Beaten to a pulp
[23:58:37] <Tucos> gnight