I hereby claim:
- I am Neopallium on github.
- I am neopallium (https://keybase.io/neopallium) on keybase.
- I have a public key whose fingerprint is 566A 9B8A 6C1F FC37 B5AB A491 0C38 AF43 3FE0 B1C0
To claim this, I am signing this object:
local mongrel2 = require 'mongrel2' | |
local sender_id = '558c92aa-1644-4e24-a524-39baad0f8e78' | |
local sub_addr = 'tcp://127.0.0.1:8989' | |
local pub_addr = 'tcp://127.0.0.1:8988' | |
local io_threads = 1 | |
-- Create new mongrel2 context | |
-- This is basically just a wrapper around the zeromq context so we can | |
-- properly terminate it, and set a number of threads to use. |
[TRACE --- connection.lua:101 -- NYI: FastFunc string.format at connection.lua:103] | |
[TRACE --- connection.lua:112 -- NYI: FastFunc string.format at connection.lua:103] | |
[TRACE --- connection.lua:128 -- NYI: FastFunc pairs at connection.lua:50] | |
[TRACE --- connection.lua:46 -- NYI: FastFunc pairs at connection.lua:50] | |
[TRACE --- decode.lua:123 -- NYI: C function 0x4089b5f8 at decode.lua:90] | |
[TRACE --- decode.lua:123 -- NYI: C function 0x41220aa0 at decode.lua:90] | |
[TRACE --- decode.lua:123 -- NYI: C function 0x41221e40 at decode.lua:90] | |
[TRACE --- decode.lua:123 -- NYI: C function 0x412238f0 at decode.lua:90] | |
[TRACE --- decode.lua:123 -- NYI: C function 0x41a39570 at decode.lua:90] | |
[TRACE --- decode.lua:123 -- NYI: C function 0x41a50ba8 at decode.lua:90] |
#if 1 | |
#define B(K, V) if((V) != NULL) { \ | |
vstr = json_escape(V); \ | |
bcatcstr(headers, ",\""); \ | |
bcatcstr(headers, bdata(K)); \ | |
bcatcstr(headers, "\":\""); \ | |
bcatcstr(headers, bdata(vstr)); \ | |
bcatcstr(headers, "\""); \ | |
bdestroy(vstr); \ | |
} |
#include <yajl/yajl_gen.h> | |
#define B(K, V) if((V) != NULL) { \ | |
yajl_gen_string(json_gen, (unsigned char *)bdata(K), blength(K)); \ | |
yajl_gen_string(json_gen, (unsigned char *)bdata(V), blength(V)); \ | |
} | |
bstring Request_to_payload(Request *req, bstring uuid, int fd, const char *buf, size_t len) | |
{ | |
static const yajl_gen_config gen_config = { .beautify = 0, .indentString = "" }; |
#include <yajl/yajl_gen.h> | |
//#define bassert(bcode) if((bcode) != BSTR_OK) abort() | |
#define bassert(bcode) (bcode) | |
#define B(K, V) if((V) != NULL) { \ | |
yajl_gen_string(json_gen, (unsigned char *)bdata(K), blength(K)); \ | |
yajl_gen_string(json_gen, (unsigned char *)bdata(V), blength(V)); \ | |
} |
#include <stdint.h> | |
#include <stdio.h> | |
#include <zmq.h> | |
int main(int argc, char *argv[]) | |
{ | |
void *context = zmq_init(1); | |
zmq_msg_t msg; | |
int rc = 0; | |
int64_t more; |
-- Release as Public Domain. | |
local function fmt_error(fmt, ...) | |
local f_type = type(fmt) | |
if f_type == 'string' then | |
if select('#', ...) > 0 then | |
return string.format(fmt, ...) | |
else | |
-- only a single string, no formating needed. | |
return fmt | |
end |
I hereby claim:
To claim this, I am signing this object:
use std::io; | |
use std::io::prelude::*; | |
use std::net::{Shutdown, TcpStream}; | |
fn main() -> io::Result<()> { | |
let mut stream = TcpStream::connect("127.0.0.1:8080").expect("Couldn't connect to the server..."); | |
stream.write(b"GET / HTTP/1.1\r\nHost: localhost:8080\r\n\r\n").expect("write"); |
[pid 21158] 20:03:34.948728 epoll_wait(7, [{EPOLLIN, {u32=4294967295, u64=18446744073709551615}}], 1024, 0) = 1 | |
[pid 21158] 20:03:34.948814 epoll_wait(7, [], 1024, 0) = 0 | |
[pid 21158] 20:03:34.948844 epoll_wait(7, <unfinished ...> | |
[pid 21159] 20:03:35.501746 <... epoll_wait resumed> [{EPOLLIN, {u32=100, u64=100}}], 128, -1) = 1 | |
[pid 21159] 20:03:35.501891 epoll_wait(10, <unfinished ...> | |
[pid 21158] 20:03:35.501903 <... epoll_wait resumed> [{EPOLLIN, {u32=4294967295, u64=18446744073709551615}}], 1024, 940) = 1 | |
[pid 21158] 20:03:35.502103 epoll_wait(7, [], 1024, 0) = 0 | |
read_available start: buf.len=0, buf.remain=8192 | |
read_available: self.read buf.len=0, buf.remain=8192 | |
[pid 21158] 20:03:35.502179 epoll_ctl(7, EPOLL_CTL_ADD, 20, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=0, u64=0}}) = 0 |