AsyncHandler is copied - it is error? #152

Closed
Mingun opened this Issue Oct 3, 2012 · 3 comments

Projects

None yet

2 participants

@Mingun
Mingun commented Oct 3, 2012

Documentation says:
Asynchronous Servers
...
An instance of Handler is taken as a reference to the constructor similar to the synchronous server implementation.
...
Synchronous Servers
An instance of Handler is taken in by reference to the constructor of the HTTP server. This means the Handler is not copied around and only a single instance of the handler is used for all connections and requests performed against the HTTP server.

Constructor of class network::http::async_server<Handler> takes handler by reference, that implies that they not copied. Therefore code below not working:

class Handler
{
private:
    Handler(const Handler&);
    const Handler& operator=(const Handler&);
public:
    ...
};

It is inaccuracy of documentation or an implementation error?

@deanberris
Member

This is an implementation bug. This is on master right?

Sent from a Galaxy Nexus.
On Oct 3, 2012 7:27 PM, "Mingun" notifications@github.com wrote:

Documentation says:
Asynchronous Servers
...
An instance of Handler is taken as a reference to the constructor similar
to the synchronous server implementation.
...
Synchronous Servers
An instance of Handler is taken in by reference to the constructor of the
HTTP server. This means the Handler is not copied around and only a single
instance of the handler is used for all connections and requests performed
against the HTTP server.

Constructor of class network::http::async_server takes handlerby reference, that implies that they not copied. Therefore code below not
working:

class Handler{private:
Handler(const Handler&);
Handler& operator=(const Handler&);public:
...};

It is inaccuracy of documentation or an implementation error?


Reply to this email directly or view it on GitHubhttps://github.com/cpp-netlib/cpp-netlib/issues/152.

@Mingun
Mingun commented Oct 3, 2012

yes

@deanberris
Member

Please try again on master or with 0.10.1 -- if this is still an issue, please re-open.

@deanberris deanberris closed this Jul 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment