diff --git a/changelog.md b/changelog.md index 39b1ba0..4f2c596 100644 --- a/changelog.md +++ b/changelog.md @@ -197,7 +197,7 @@ HEAD - Change default HTTP response error code when no http_handler is defined from 500/Internal Server Error to 426/Upgrade Required - Remove timezone from logger timestamp to work around issues with the Windows - implimentation of strftime. Thank you breyed for testing and code. #257 + implementation of strftime. Thank you breyed for testing and code. #257 - Switch integer literals to char literals to improve VCPP compatibility. Thank you breyed for testing and code. #257 - Add MSVCPP warning suppression for the bundled SHA1 library. Thank you breyed diff --git a/tutorials/chat_tutorial/chat_tutorial.md b/tutorials/chat_tutorial/chat_tutorial.md index e50fca5..042837c 100644 --- a/tutorials/chat_tutorial/chat_tutorial.md +++ b/tutorials/chat_tutorial/chat_tutorial.md @@ -2,7 +2,7 @@ Chat Tutorial ============= Goals of this tutorial: -- Impliment a realtime websocket chat server +- Implement a realtime websocket chat server Server diff --git a/websocketpp/config/minimal_server.hpp b/websocketpp/config/minimal_server.hpp index f6cdf0f..dd1aedb 100644 --- a/websocketpp/config/minimal_server.hpp +++ b/websocketpp/config/minimal_server.hpp @@ -112,10 +112,8 @@ struct minimal_server { endpoint_msg_manager_type; /// Logging policies - typedef websocketpp::log::stub elog_type; - typedef websocketpp::log::stub alog_type; + typedef websocketpp::log::stub elog_type; + typedef websocketpp::log::stub alog_type; /// RNG policies typedef websocketpp::random::none::int_generator rng_type; diff --git a/websocketpp/connection.hpp b/websocketpp/connection.hpp index 7e9f3c0..596c6e0 100644 --- a/websocketpp/connection.hpp +++ b/websocketpp/connection.hpp @@ -119,7 +119,7 @@ typedef lib::function pong_timeout_handler; /** * The validate handler is called after a WebSocket handshake has been received * and processed but before it has been accepted. This gives the application a - * chance to impliment connection details specific policies for accepting + * chance to implement connection details specific policies for accepting * connections and the ability to negotiate extensions and subprotocols. * * The validate handler return value indicates whether or not the connection diff --git a/websocketpp/extensions/permessage_deflate/enabled.hpp b/websocketpp/extensions/permessage_deflate/enabled.hpp index cede57e..73b9b30 100644 --- a/websocketpp/extensions/permessage_deflate/enabled.hpp +++ b/websocketpp/extensions/permessage_deflate/enabled.hpp @@ -46,7 +46,7 @@ namespace websocketpp { namespace extensions { -/// Implimentation of the draft permessage-deflate WebSocket extension +/// Implementation of the draft permessage-deflate WebSocket extension /** * ### permessage-deflate interface * @@ -289,7 +289,7 @@ public: /// Test if this object implements the permessage-deflate specification /** - * Because this object does impliment it, it will always return true. + * Because this object does implieent it, it will always return true. * * @return Whether or not this object implements permessage-deflate */ diff --git a/websocketpp/transport/stub/base.hpp b/websocketpp/transport/stub/base.hpp index 864372a..754981e 100644 --- a/websocketpp/transport/stub/base.hpp +++ b/websocketpp/transport/stub/base.hpp @@ -45,11 +45,11 @@ enum value { /// categories general = 1, - /// not implimented - not_implimented + /// not implemented + not_implemented }; -/// iostream transport error category +/// stub transport error category class category : public lib::error_category { public: category() {} @@ -62,8 +62,8 @@ class category : public lib::error_category { switch(value) { case general: return "Generic stub transport policy error"; - case not_implimented: - return "feature not implimented"; + case not_implemented: + return "feature not implemented"; default: return "Unknown"; } diff --git a/websocketpp/transport/stub/connection.hpp b/websocketpp/transport/stub/connection.hpp index fa06f30..3e501a9 100644 --- a/websocketpp/transport/stub/connection.hpp +++ b/websocketpp/transport/stub/connection.hpp @@ -73,6 +73,7 @@ public: typedef lib::shared_ptr timer_ptr; explicit connection(bool is_server, alog_type & alog, elog_type & elog) + : m_alog(alog), m_elog(elog) { m_alog.write(log::alevel::devel,"stub con transport constructor"); } @@ -161,7 +162,7 @@ protected: */ void init(init_handler handler) { m_alog.write(log::alevel::devel,"stub connection init"); - handler(make_error_code(error::not_implimented)); + handler(make_error_code(error::not_implemented)); } /// Initiate an async_read for at least num_bytes bytes into buf @@ -192,7 +193,7 @@ protected: read_handler handler) { m_alog.write(log::alevel::devel, "stub_con async_read_at_least"); - handler(make_error_code(error::not_implimented)); + handler(make_error_code(error::not_implemented), 0); } /// Asyncronous Transport Write @@ -209,7 +210,7 @@ protected: */ void async_write(char const * buf, size_t len, write_handler handler) { m_alog.write(log::alevel::devel,"stub_con async_write"); - handler(make_error_code(error::not_implimented)); + handler(make_error_code(error::not_implemented)); } /// Asyncronous Transport Write (scatter-gather) @@ -225,7 +226,7 @@ protected: */ void async_write(std::vector const & bufs, write_handler handler) { m_alog.write(log::alevel::devel,"stub_con async_write buffer list"); - handler(make_error_code(error::not_implimented)); + handler(make_error_code(error::not_implemented)); } /// Set Connection Handle @@ -259,6 +260,8 @@ protected: } private: // member variables! + alog_type & m_alog; + elog_type & m_elog; }; diff --git a/websocketpp/transport/stub/endpoint.hpp b/websocketpp/transport/stub/endpoint.hpp index 7be76d7..3bbb78f 100644 --- a/websocketpp/transport/stub/endpoint.hpp +++ b/websocketpp/transport/stub/endpoint.hpp @@ -55,7 +55,7 @@ public: /// Type of this endpoint transport component's associated connection /// transport component. - typedef iostream::connection transport_con_type; + typedef stub::connection transport_con_type; /// Type of a shared pointer to this endpoint transport component's /// associated connection transport component typedef typename transport_con_type::ptr transport_con_ptr; @@ -113,7 +113,7 @@ protected: * @param cb The function to call back with the results when complete. */ void async_connect(transport_con_ptr tcon, uri_ptr u, connect_handler cb) { - cb(make_error_code(error::not_implimented)); + cb(make_error_code(error::not_implemented)); } /// Initialize a connection @@ -127,7 +127,7 @@ protected: * @return A status code indicating the success or failure of the operation */ lib::error_code init(transport_con_ptr tcon) { - cb(make_error_code(error::not_implimented)); + return make_error_code(error::not_implemented); } private: