void def(boost::string_ref identify, Result (*func)(Args...)) { lua_pushcfunction(lua_, reinterpret_cast<lua_CFunction>(func)); lua_pushcclosure(lua_, detail::c_function_call<Result, Args...>, 1); lua_setglobal(lua_, identify.data()); }
void on_body(boost::string_ref const& s, error_code& ec) { r_.write(s.data(), s.size(), ec); }
explicit message(boost::string_ref str) : message(boost::asio::buffer(str.data(), str.size())) { }
void on_field(boost::string_ref const& s, error_code&) { flush(); field_.append(s.data(), s.size()); }
void on_value(boost::string_ref const& s, error_code&) { value_.append(s.data(), s.size()); }
void on_uri(boost::string_ref const& s, error_code&) { this->uri_.append(s.data(), s.size()); }
void on_reason(boost::string_ref const& s, error_code&) { this->reason_.append(s.data(), s.size()); }
void server::p_nctcp(const boost::string_ref & to, const boost::string_ref & msg) { tcp_sendf (*this, "NOTICE %s :\001%s\001\r\n", to.data(), msg.data()); }
void on_method(boost::string_ref const& s, error_code&) { this->method_.append(s.data(), s.size()); }
void operator()(msgpack::object& o, const boost::string_ref& v) const { uint32_t size = checked_get_container_size(v.size()); o.type = msgpack::type::STR; o.via.str.ptr = v.data(); o.via.str.size = size; }
/// Set the word inside the cache supllying the hash value to be used inline void set(const boost::string_ref& word, uint32_t hashKey) { len=word.size(); memcpy(lastMatch.data(),word.data(), len); hash=hashKey; }
format_intrusive_result format_value(boost::string_ref value) { return format_intrusive_result(value.data(), value.length()); }
void on_body(boost::string_ref const& s, error_code& ec) { if(fc_.fail(ec)) return; body.append(s.data(), s.size()); }
inline F get_proc_address( HMODULE mod, boost::string_ref name ) noexcept { return reinterpret_cast<F>( GetProcAddress( mod, name.data() ) ); }