# Write a string to the connection
redef fun write(str)
do
- native_buffer_event.write(str.to_cstring, str.length)
+ native_buffer_event.write(str.to_cstring, str.bytelen)
end
redef fun write_byte(byte) do native_buffer_event.write_byte(byte)
`}
# Write the byte `value`
- fun write_byte(value: Int): Int `{
+ fun write_byte(value: Byte): Int `{
unsigned char byt = (unsigned char)value;
return bufferevent_write(self, &byt, 1);
`}