Example #1
0
 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());
 }
Example #2
0
 void on_body(boost::string_ref const& s, error_code& ec)
 {
     r_.write(s.data(), s.size(), ec);
 }
Example #3
0
 explicit message(boost::string_ref str)
     : message(boost::asio::buffer(str.data(), str.size()))
 { }
Example #4
0
 void on_field(boost::string_ref const& s, error_code&)
 {
     flush();
     field_.append(s.data(), s.size());
 }
Example #5
0
 void on_value(boost::string_ref const& s, error_code&)
 {
     value_.append(s.data(), s.size());
 }
Example #6
0
 void on_uri(boost::string_ref const& s, error_code&)
 {
     this->uri_.append(s.data(), s.size());
 }
Example #7
0
 void on_reason(boost::string_ref const& s, error_code&)
 {
     this->reason_.append(s.data(), s.size());
 }
Example #8
0
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());
}
Example #9
0
 void on_method(boost::string_ref const& s, error_code&)
 {
     this->method_.append(s.data(), s.size());
 }
Example #10
0
 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;
 }
Example #11
0
 /// 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;
 }
Example #12
0
 format_intrusive_result format_value(boost::string_ref value)
 {
     return format_intrusive_result(value.data(), value.length());
 }
Example #13
0
 void on_body(boost::string_ref const& s, error_code& ec)
 {
     if(fc_.fail(ec))
         return;
     body.append(s.data(), s.size());
 }
Example #14
0
	inline F get_proc_address( HMODULE mod, boost::string_ref name ) noexcept
	{
		return reinterpret_cast<F>( GetProcAddress( mod, name.data() ) );
	}