typos and fixes for stub config and minimal config
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -2,7 +2,7 @@ Chat Tutorial
|
||||
=============
|
||||
|
||||
Goals of this tutorial:
|
||||
- Impliment a realtime websocket chat server
|
||||
- Implement a realtime websocket chat server
|
||||
|
||||
|
||||
Server
|
||||
|
||||
@@ -112,10 +112,8 @@ struct minimal_server {
|
||||
endpoint_msg_manager_type;
|
||||
|
||||
/// Logging policies
|
||||
typedef websocketpp::log::stub<concurrency_type,
|
||||
websocketpp::log::elevel> elog_type;
|
||||
typedef websocketpp::log::stub<concurrency_type,
|
||||
websocketpp::log::alevel> alog_type;
|
||||
typedef websocketpp::log::stub elog_type;
|
||||
typedef websocketpp::log::stub alog_type;
|
||||
|
||||
/// RNG policies
|
||||
typedef websocketpp::random::none::int_generator<uint32_t> rng_type;
|
||||
|
||||
@@ -119,7 +119,7 @@ typedef lib::function<void(connection_hdl,std::string)> 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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ public:
|
||||
typedef lib::shared_ptr<timer> 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<buffer> 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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
/// Type of this endpoint transport component's associated connection
|
||||
/// transport component.
|
||||
typedef iostream::connection<config> transport_con_type;
|
||||
typedef stub::connection<config> 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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user