{"action":"created","issue":{"url":"https://api.github.com/repos/vadz/network_benchmark/issues/1","repository_url":"https://api.github.com/repos/vadz/network_benchmark","labels_url":"https://api.github.com/repos/vadz/network_benchmark/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/vadz/network_benchmark/issues/1/comments","events_url":"https://api.github.com/repos/vadz/network_benchmark/issues/1/events","html_url":"https://github.com/vadz/network_benchmark/issues/1","id":170719879,"number":1,"title":"Notes on the Beast benchmark code","user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-11T18:58:13Z","updated_at":"2016-08-11T21:55:34Z","closed_at":null,"body":"The `teardown` and `async_teardown` functions are not intended to be called directly. Instead, they are called by the implementation to handle closure of the underlying stream when a \"Close the WebSocket Connection\" operation is required (see https://tools.ietf.org/html/rfc6455#section-7.1.1).\r\n\r\nThese functions implement compile-time polymorphism: the `websocket::stream` delegates the closure of the underlying stream to the free function - locating it by argument-dependent lookup. This is necessary because SSL and plain connections require different code.\r\n\r\nIf `websocket::stream` is instantiated with a template type that is not `ip::tcp::socket` or `ssl::stream`, it is the responsibility of the caller to provide suitable overloads for `teardown` and `async_teardown`.\r\n\r\nI've reviewed the Beast documentation and it is something that could use a better explanation. For now, observe that `websocket::stream` read operations invoke the teardown function to close the connection:\r\n\r\nhttps://github.com/vinniefalco/Beast/blob/master/include/beast/websocket/impl/stream.ipp#L680\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vadz/network_benchmark/issues/comments/239305441","html_url":"https://github.com/vadz/network_benchmark/issues/1#issuecomment-239305441","issue_url":"https://api.github.com/repos/vadz/network_benchmark/issues/1","id":239305441,"user":{"login":"vadz","id":146917,"avatar_url":"https://avatars.githubusercontent.com/u/146917?v=3","gravatar_id":"","url":"https://api.github.com/users/vadz","html_url":"https://github.com/vadz","followers_url":"https://api.github.com/users/vadz/followers","following_url":"https://api.github.com/users/vadz/following{/other_user}","gists_url":"https://api.github.com/users/vadz/gists{/gist_id}","starred_url":"https://api.github.com/users/vadz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadz/subscriptions","organizations_url":"https://api.github.com/users/vadz/orgs","repos_url":"https://api.github.com/users/vadz/repos","events_url":"https://api.github.com/users/vadz/events{/privacy}","received_events_url":"https://api.github.com/users/vadz/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T21:55:34Z","updated_at":"2016-08-11T21:55:34Z","body":"I've tried to update the client following your remarks, thanks! I think now it's the server that doesn't behave correctly as it just closes the connection at TCP level without closing the web socket first, hence the need to test for `asio::error::eof`. I'll try to update the server too, but this shouldn't materially change the speed measured here, AFAICS."}}
{"actor":{"display_login":"vadz"}}