nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interpreter&vm: handle multi-iterator
[nit.git]
/
lib
/
libevent.nit
diff --git
a/lib/libevent.nit
b/lib/libevent.nit
index
7db0169
..
7794ed5
100644
(file)
--- a/
lib/libevent.nit
+++ b/
lib/libevent.nit
@@
-157,7
+157,7
@@
class Connection
# Write a string to the connection
redef fun write(str)
do
# 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)
end
redef fun write_byte(byte) do native_buffer_event.write_byte(byte)
@@
-186,9
+186,9
@@
extern class NativeBufferEvent `{ struct bufferevent * `}
`}
# Write the byte `value`
`}
# Write the byte `value`
- fun write_byte(value: Int): Int `{
+ fun write_byte(value: Byte): Int `{
unsigned char byt = (unsigned char)value;
unsigned char byt = (unsigned char)value;
- return bufferevent_write(recv, &byt, 1);
+ return bufferevent_write(self, &byt, 1);
`}
# Check if we have anything left in our buffers. If so, we set our connection to be closed
`}
# Check if we have anything left in our buffers. If so, we set our connection to be closed