You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(52) |
Jun
(30) |
Jul
(17) |
Aug
(9) |
Sep
(4) |
Oct
(7) |
Nov
(11) |
Dec
(19) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
(37) |
Apr
(28) |
May
(15) |
Jun
(28) |
Jul
(7) |
Aug
(125) |
Sep
(116) |
Oct
(85) |
Nov
(14) |
Dec
(6) |
2009 |
Jan
(11) |
Feb
(4) |
Mar
(5) |
Apr
|
May
(9) |
Jun
(5) |
Jul
(4) |
Aug
(40) |
Sep
(1) |
Oct
(19) |
Nov
(43) |
Dec
(45) |
2010 |
Jan
(76) |
Feb
(95) |
Mar
(3) |
Apr
(23) |
May
(39) |
Jun
(54) |
Jul
(6) |
Aug
(13) |
Sep
(12) |
Oct
(59) |
Nov
(53) |
Dec
(43) |
2011 |
Jan
(43) |
Feb
(44) |
Mar
(25) |
Apr
(23) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(2) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
From: Dean M. B. <mik...@gm...> - 2010-05-26 07:54:40
|
Hi Darren! On Wed, May 26, 2010 at 3:49 PM, Darren Garvey <dar...@gm...> wrote: > Hi Dean, > > On 26 May 2010 08:00, Dean Michael Berris <mik...@gm...> wrote: >> >> Tests from the Linux users would be very much appreciated. > > Sounds good. Can you include a link please? I might be able to run the tests > on linux later today. > Sorry about that, I was assuming everyone knew. :) http://github.com/mikhailberis/cpp-netlib -- you can clone the git repository or get a fork of your own on github too and fix things in case I broke anything on your fork, then ask me to pull you changes if there are any required. If any part is unclear please let me know so that I can respond soon as I can. > Cheers, Thanks and have a great day! -- Dean Michael Berris deanberris.com |
From: Darren G. <dar...@gm...> - 2010-05-26 07:49:57
|
Hi Dean, On 26 May 2010 08:00, Dean Michael Berris <mik...@gm...> wrote: > > Tests from the Linux users would be very much appreciated. > Sounds good. Can you include a link please? I might be able to run the tests on linux later today. Cheers, Darren |
From: Dean M. B. <mik...@gm...> - 2010-05-26 07:01:11
|
Hi Everyone! I just wanted to share that I recently just got access to a Windows development machine that is way faster than my Linux development machine. I've made some changes on my branch's master which basically fixes issues encountered on MSVC 10. I have yet to fix the broken tests, but I'm thinking of releasing a 0.6.1 that addresses the MSVC issues. Tests from the Linux users would be very much appreciated. Thanks and I hope this helps! -- Dean Michael Berris deanberris.com |
From: Dean M. B. <mik...@gm...> - 2010-04-13 03:20:32
|
On Tue, Apr 13, 2010 at 3:17 AM, Kim Gräsman <kim...@gm...> wrote: > Hi Erik, > > On Mon, Apr 12, 2010 at 21:11, Nelson, Erik - 2 > <eri...@ba...> wrote: >> On Monday, April 12, 2010 2:52 PM Kim Gräsman wrote: >> >>>>On Mon, Apr 12, 2010 at 16:37, Nelson, Erik - 2 >>>> It's a big problem... as it is now, any process can hijack another application's port. >> >>>Yeah, I can see that. Maybe not so good... It'd be nice if the socket >>>flags were configurable. >> >> They are configurable... this flag is being set within cpp-netlib > > Yes, I meant configurable in cpp-netlib's http server, so that users > of the server can choose whether they want SO_REUSEADDR or not. > Sounds like a patch waiting to happen to me. :) Fork and pull request! :D -- Dean Michael Berris deanberris.com |
From: Kim G. <kim...@gm...> - 2010-04-12 19:17:14
|
Hi Erik, On Mon, Apr 12, 2010 at 21:11, Nelson, Erik - 2 <eri...@ba...> wrote: > On Monday, April 12, 2010 2:52 PM Kim Gräsman wrote: > >>>On Mon, Apr 12, 2010 at 16:37, Nelson, Erik - 2 >>> It's a big problem... as it is now, any process can hijack another application's port. > >>Yeah, I can see that. Maybe not so good... It'd be nice if the socket >>flags were configurable. > > They are configurable... this flag is being set within cpp-netlib Yes, I meant configurable in cpp-netlib's http server, so that users of the server can choose whether they want SO_REUSEADDR or not. - Kim |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-12 19:12:04
|
On Monday, April 12, 2010 2:52 PM Kim Gräsman wrote: >>On Mon, Apr 12, 2010 at 16:37, Nelson, Erik - 2 >> It's a big problem... as it is now, any process can hijack another application's port. >Yeah, I can see that. Maybe not so good... It'd be nice if the socket >flags were configurable. They are configurable... this flag is being set within cpp-netlib Erik |
From: Kim G. <kim...@gm...> - 2010-04-12 18:51:51
|
Hi Erik, On Mon, Apr 12, 2010 at 16:37, Nelson, Erik - 2 <eri...@ba...> wrote: > > Saturday, April 10, 2010 3:48 AM Kim Gräsman wrote: > > >>I'm not even sure it's a problem, really. It's just a bit confusing, >>but I'm not sure I see a breaking scenario if listening to the same >>port twice _doesn't_ throw, which seems to be scenario here. Thoughts? > > It's a big problem... as it is now, any process can hijack another application's port. Yeah, I can see that. Maybe not so good... It'd be nice if the socket flags were configurable. - Kim |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-12 14:37:57
|
Saturday, April 10, 2010 3:48 AM Kim Gräsman wrote: >I'm not even sure it's a problem, really. It's just a bit confusing, >but I'm not sure I see a breaking scenario if listening to the same >port twice _doesn't_ throw, which seems to be scenario here. Thoughts? It's a big problem... as it is now, any process can hijack another application's port. Erik |
From: Dean M. B. <mik...@gm...> - 2010-04-10 07:55:47
|
On Sat, Apr 10, 2010 at 3:48 PM, Kim Gräsman <kim...@gm...> wrote: > Hello, > > On Sat, Apr 10, 2010 at 07:20, Dean Michael Berris > <mik...@gm...> wrote: >> >> If the system is POSIX compliant, this should not be an issue because >> SO_REUSEADDR applies to whether the listening application can re-use >> the socket in the TIME_WAIT state (that which has been closed >> already). This is important for efficiency reasons, although can >> definitely be dangerous in systems where the networking stack doesn't >> clean up properly. >> >> If this is a problem only in Windows then we should have a special >> compiler flag that turns it off. >> >> http://www.unixguide.net/network/socketfaq/4.5.shtml > > I'm not even sure it's a problem, really. It's just a bit confusing, > but I'm not sure I see a breaking scenario if listening to the same > port twice _doesn't_ throw, which seems to be scenario here. Thoughts? > If the problem is really that in Windows, then it might be a bug in Asio. The thing is, in Linux at least, the expectation when you try to listen/bind to an address/port pair that is already bound to by some other process, the second attempt should fail. I am not sure if this is the same in Windows, and if removing the SO_REUSEADDR is the solution for that platform to keep the expectations consistent on both Linux and Windows, then it might be worth addressing. HTH -- Dean Michael Berris deanberris.com |
From: Kim G. <kim...@gm...> - 2010-04-10 07:48:19
|
Hello, On Sat, Apr 10, 2010 at 07:20, Dean Michael Berris <mik...@gm...> wrote: > > If the system is POSIX compliant, this should not be an issue because > SO_REUSEADDR applies to whether the listening application can re-use > the socket in the TIME_WAIT state (that which has been closed > already). This is important for efficiency reasons, although can > definitely be dangerous in systems where the networking stack doesn't > clean up properly. > > If this is a problem only in Windows then we should have a special > compiler flag that turns it off. > > http://www.unixguide.net/network/socketfaq/4.5.shtml I'm not even sure it's a problem, really. It's just a bit confusing, but I'm not sure I see a breaking scenario if listening to the same port twice _doesn't_ throw, which seems to be scenario here. Thoughts? - Kim |
From: Dean M. B. <mik...@gm...> - 2010-04-10 05:20:28
|
On Sat, Apr 10, 2010 at 1:49 AM, Nelson, Erik - 2 <eri...@ba...> wrote: > > http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx > > looks like maybe there should be no SO_REUSADDR (or maybe there should be a SO_EXCLUSIVEADDRUSE) as SO_REUSADDR causes indeterminate behavior > If the system is POSIX compliant, this should not be an issue because SO_REUSEADDR applies to whether the listening application can re-use the socket in the TIME_WAIT state (that which has been closed already). This is important for efficiency reasons, although can definitely be dangerous in systems where the networking stack doesn't clean up properly. If this is a problem only in Windows then we should have a special compiler flag that turns it off. http://www.unixguide.net/network/socketfaq/4.5.shtml -- Dean Michael Berris deanberris.com |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-09 20:14:23
|
On Friday, April 09, 2010 12:27 PM Kim Gräsman wrote: >I wonder if SO_REUSEADDR has anything to do with it... >http://www.unixguide.net/network/socketfaq/4.5.shtml If I comment out //acceptor_.set_option(tcp::acceptor::reuse_address(true)); In http::basic_server, the behavior is as expected. Erik |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-09 17:49:25
|
-----Original Message----- From: Kim Gräsman [mailto:kim...@gm...] Sent: Friday, April 09, 2010 12:27 PM To: C++ Networking Library Developers Mailing List Subject: Re: [cpp-netlib-devel] two servers listening on same port? Hi guys, On Fri, Apr 9, 2010 at 17:58, Nelson, Erik - 2 <eri...@ba...> wrote: > >>Okay, can you give more details? What compiler, which OS, >>what are the exact arguments you're providing? Did you >>compile the example with bjam, what version of Boost are you using? > >>It's going to be really hard to help if you can't give us more to look > at. ;) > > I compiled with MSVC 2008 on Windows XP, using arguments of "localhost" > and "3000". I'm using boost 1.42, not using bjam, just added the > hello_world_server.cpp to my visual studio project. >I wonder if SO_REUSEADDR has anything to do with it... >http://www.unixguide.net/network/socketfaq/4.5.shtml I think you might be right... http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx looks like maybe there should be no SO_REUSADDR (or maybe there should be a SO_EXCLUSIVEADDRUSE) as SO_REUSADDR causes indeterminate behavior Erik |
From: Kim G. <kim...@gm...> - 2010-04-09 16:27:28
|
Hi guys, On Fri, Apr 9, 2010 at 17:58, Nelson, Erik - 2 <eri...@ba...> wrote: > >>Okay, can you give more details? What compiler, which OS, >>what are the exact arguments you're providing? Did you >>compile the example with bjam, what version of Boost are you using? > >>It's going to be really hard to help if you can't give us more to look > at. ;) > > I compiled with MSVC 2008 on Windows XP, using arguments of "localhost" > and "3000". I'm using boost 1.42, not using bjam, just added the > hello_world_server.cpp to my visual studio project. I wonder if SO_REUSEADDR has anything to do with it... http://www.unixguide.net/network/socketfaq/4.5.shtml - Kim |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-09 15:58:49
|
On Friday, April 09, 2010 11:35 AM Dean Michael Berris wrote: >Okay, can you give more details? What compiler, which OS, >what are the exact arguments you're providing? Did you >compile the example with bjam, what version of Boost are you using? >It's going to be really hard to help if you can't give us more to look at. ;) I compiled with MSVC 2008 on Windows XP, using arguments of "localhost" and "3000". I'm using boost 1.42, not using bjam, just added the hello_world_server.cpp to my visual studio project. Thanks Erik |
From: Dean M. B. <mik...@gm...> - 2010-04-09 15:35:40
|
On Fri, Apr 9, 2010 at 10:58 PM, Nelson, Erik - 2 <eri...@ba...> wrote: > On , April 09, 2010 5:48 AM Dean Michael Berris wrote: > >>Alright, I just tried it and I get an exception on the second one. >>I did this in Linux, just as expected. > >>Are you getting anything else? > > I get something else... both programs run without any indication of an > error. > Okay, can you give more details? What compiler, which OS, what are the exact arguments you're providing? Did you compile the example with bjam, what version of Boost are you using? It's going to be really hard to help if you can't give us more to look at. ;) -- Dean Michael Berris deanberris.com |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-09 14:58:30
|
On , April 09, 2010 5:48 AM Dean Michael Berris wrote: >Alright, I just tried it and I get an exception on the second one. >I did this in Linux, just as expected. >Are you getting anything else? I get something else... both programs run without any indication of an error. Erik |
From: Dean M. B. <mik...@gm...> - 2010-04-09 09:48:54
|
On Thu, Apr 8, 2010 at 11:58 PM, Nelson, Erik - 2 <eri...@ba...> wrote: > On Thursday, April 08, 2010 11:54 AM Dean Michael Berris wrote: > >>I don't see where hello_world_server.cpp is in the library. Which file >>are you talking about? > > mikhailberis-cpp-netlib-12c62f7/libs/network/example/http/hello_world_server.cpp > Alright, I just tried it and I get an exception on the second one. I did this in Linux, just as expected. Are you getting anything else? -- Dean Michael Berris deanberris.com |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-08 15:59:00
|
On Thursday, April 08, 2010 11:54 AM Dean Michael Berris wrote: >I don't see where hello_world_server.cpp is in the library. Which file >are you talking about? mikhailberis-cpp-netlib-12c62f7/libs/network/example/http/hello_world_server.cpp Erik |
From: Dean M. B. <mik...@gm...> - 2010-04-08 15:54:19
|
On Thu, Apr 8, 2010 at 11:41 PM, Nelson, Erik - 2 <eri...@ba...> wrote: > > I think I confused the issue by bringing up the threads... maybe taking a step back, what would you expect to happen if two copies of hello_world_server.cpp are run simultaneously (separate processes, same hostname and port)? When I do that, I get no exception or any indication that one of them is not actually operating properly. > I don't see where hello_world_server.cpp is in the library. Which file are you talking about? -- Dean Michael Berris deanberris.com |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-08 15:41:46
|
on Thursday, April 08, 2010 3:23 Dean Michael Berris wrote: >>eri...@ba...> wrote: >> >> int main(int argc, char * argv[]) { >> try { >> ThreadServer thread_server("localhost", "3000"); >> boost::thread thread_(boost::bind(&ThreadServer::thread_func, boost::ref(thread_server))); >> hello_world handler; >> http::server<hello_world> server("localhost", "3000", handler); >> server.run(); >Here, you are blocking the current thread. >> thread_.join(); >And if ever you get here, the exception will throw. I think I confused the issue by bringing up the threads... maybe taking a step back, what would you expect to happen if two copies of hello_world_server.cpp are run simultaneously (separate processes, same hostname and port)? When I do that, I get no exception or any indication that one of them is not actually operating properly. Erik |
From: Dean M. B. <mik...@gm...> - 2010-04-08 07:23:22
|
On Thu, Apr 8, 2010 at 1:49 AM, Nelson, Erik - 2 <eri...@ba...> wrote: > > int main(int argc, char * argv[]) { > try { > ThreadServer thread_server("localhost", "3000"); > boost::thread thread_(boost::bind(&ThreadServer::thread_func, boost::ref(thread_server))); > hello_world handler; > http::server<hello_world> server("localhost", "3000", handler); > server.run(); Here, you are blocking the current thread. > thread_.join(); And if ever you get here, the exception will throw. -- Dean Michael Berris deanberris.com |
From: Nelson, E. - 2 <eri...@ba...> - 2010-04-07 17:49:56
|
On Wednesday, April 07, 2010 11:11 AM Dean Michael Berris wrote: >A more complete listing would definitely help me debug it or reproduce at least. In my experience in the past, it wasn't possible to bind two sockets to the same port- it caused an error, which makes sense to me. I'm running this example on Windows XP with MSVC2008 Thanks Erik ******************** #include <boost/network/protocol/http/server.hpp> #include <boost/thread/thread.hpp> #include <iostream> namespace http = boost::network::http; struct goodbye_world { void operator() (http::server<goodbye_world>::request const &request, http::server<goodbye_world>::response &response) { response = http::server<goodbye_world>::response::stock_reply( http::server<goodbye_world>::response::ok, "Goodbye, World!"); } void log(...) {} }; struct ThreadServer { ThreadServer(const char* hostname, const char* port) : server(hostname, port, handler) {} goodbye_world handler; http::server<goodbye_world> server; void thread_func() { server.run(); } }; struct hello_world { void operator() (http::server<hello_world>::request const &request, http::server<hello_world>::response &response) { response = http::server<hello_world>::response::stock_reply( http::server<hello_world>::response::ok, "Hello, World!"); } void log(...) {} }; int main(int argc, char * argv[]) { try { ThreadServer thread_server("localhost", "3000"); boost::thread thread_(boost::bind(&ThreadServer::thread_func, boost::ref(thread_server))); hello_world handler; http::server<hello_world> server("localhost", "3000", handler); server.run(); thread_.join(); } catch (std::exception &e) { std::cerr << e.what() << std::endl; } } |
From: Dean M. B. <mik...@gm...> - 2010-04-07 15:11:23
|
On Wed, Apr 7, 2010 at 11:06 PM, Glyn Matthews <gly...@gm...> wrote: > Hi Erik, > > On 6 April 2010 18:20, Nelson, Erik - 2 <eri...@ba...> > wrote: >> >> If I try to run two servers on the same port, will I get an error? Taking >> from the hello_world_server.cpp example, something like >> >> >> >> >> >> hello_world handler; >> >> server server_(“localhost”, “3000”, handler); >> >> server server_1(“localhost”, “3000”, handler); >> >> >> >> if I call run() on both servers from different threads, it appears that no >> exception is thrown… is that expected behavior? Is there some way to detect >> if a port is already in use? >> If you're using Boost.Thread, the exception will actually emerge at the point of the join. A more complete listing would definitely help me debug it or reproduce at least. (For some reason I don't see your email to the list, might have something to do with Google's spam filters...) -- Dean Michael Berris deanberris.com |
From: Glyn M. <gly...@gm...> - 2010-04-07 15:06:43
|
Hi Erik, On 6 April 2010 18:20, Nelson, Erik - 2 <eri...@ba...>wrote: > If I try to run two servers on the same port, will I get an error? > Taking from the hello_world_server.cpp example, something like > > > > > > hello_world handler; > > server server_(“localhost”, “3000”, handler); > > server server_1(“localhost”, “3000”, handler); > > > > if I call run() on both servers from different threads, it appears that no > exception is thrown… is that expected behavior? Is there some way to detect > if a port is already in use? > > > I don't think there is an expected behaviour for running two servers on the same port in the same process, but normally it shouldn't work if the port is already in use. Can you add this to the issue tracker? Thanks, Glyn |