lua-resty-core icon indicating copy to clipboard operation
lua-resty-core copied to clipboard

ffi_write new API: Create output.lua

Open hkmo opened this issue 9 years ago • 3 comments

ffi_write new API function.

Requires PR: https://github.com/openresty/lua-nginx-module/pull/960

This new FFI API function is used to print a string buffer on the client output starting from a given offset and ending at given length. This avoids the overhead of creating another string in the lua land.

hkmo avatar Jan 17 '17 22:01 hkmo

We also need test cases in the existing test suite for this new feature.

agentzh avatar Jan 18 '17 19:01 agentzh

@hkmo We should return an error message string instead of a low level error code. See other Lua API functions in this Lua library for examples.

agentzh avatar Jan 18 '17 21:01 agentzh

@hkmo Also, you need to pass the Travis CI testing associated with this PR. It's currently failing (see below on the web page).

agentzh avatar Jan 18 '17 21:01 agentzh