Add clear function
Fix bytebuffer type
Remove char* cast
add netsocket_bind_to_iface
use netlayer