class_docstr: Interface for stream protocol with manual buffer control.
  
  Event methods, such as `create_server` and `create_connection`,
  accept factories that return protocols that implement this interface.
  
  The idea of BufferedProtocol is that it allows to manually allocate
  and control the receive buffer.  Event loops can then use the buffer
  provided by the protocol to avoid unnecessary data copies.  This
  can result in noticeable performance improvement for protocols that
  receive big amounts of data.  Sophisticated protocols can allocate
  the buffer only once at creation time.
  
  State machine of calls:
  
    start -> CM [-> GB [-> BU?]]* [-> ER?] -> CL -> end
  
  * CM: connection_made()
  * GB: get_buffer()
  * BU: buffer_updated()
  * ER: eof_received()
  * CL: connection_lost()
class_docstr_tok: ["Interface","for","stream","protocol","with","manual","buffer","control",".","Event","methods",",","such","as","`","create_server","`","and","`","create_connection","`",",","accept","factories","that","return","protocols","that","implement","this","interface",".","The","idea","of","BufferedProtocol","is","that","it","allows","to","manually","allocate","and","control","the","receive","buffer",".","Event","loops","can","then","use","the","buffer","provided","by","the","protocol","to","avoid","unnecessary","data","copies",".","This","can","result","in","noticeable","performance","improvement","for","protocols","that","receive","big","amounts","of","data",".","Sophisticated","protocols","can","allocate","the","buffer","only","once","at","creation","time",".","State","machine","of","calls",":","start","-",">","CM","[","-",">","GB","[","-",">","BU","?","]","]","*","[","-",">","ER","?","]","-",">","CL","-",">","end","*","CM",":","connection_made","(",")","*","GB",":","get_buffer","(",")","*","BU",":","buffer_updated","(",")","*","ER",":","eof_received","(",")","*","CL",":","connection_lost","(",")"]
docstr: Called to allocate a new receive buffer.
  
  *sizehint* is a recommended minimal size for the returned
  buffer.  When set to -1, the buffer size can be arbitrary.
  
  Must return an object that implements the
  :ref:`buffer protocol <bufferobjects>`.
  It is an error to return a zero-sized buffer.
docstr_tok: ["Called","to","allocate","a","new","receive","buffer",".","*","sizehint","*","is","a","recommended","minimal","size","for","the","returned","buffer",".","When","set","to","-1",",","the","buffer","size","can","be","arbitrary",".","Must","return","an","object","that","implements","the",":","ref",":","`","buffer","protocol","<","bufferobjects",">","`",".","It","is","an","error","to","return","a","zero-sized","buffer","."]
code: def get_buffer(self, sizehint):
      """Called to allocate a new receive buffer.
  
      *sizehint* is a recommended minimal size for the returned
      buffer.  When set to -1, the buffer size can be arbitrary.
  
      Must return an object that implements the
      :ref:`buffer protocol <bufferobjects>`.
      It is an error to return a zero-sized buffer.
      """
  
label_desc: Use image node_id 1 for calling the BufferedProtocol obj's underlying member method code with example usage: obj.get_buffer(sizehint) without return types