split the send function into send and beginSend functions
peek function
write function
flush function
inherit Stream