code: def socket_send(self):
          
          if len(self.send_buffer):
              try:
                  sent = self.sock.send(self.send_buffer)
              except socket.error, err:
                  print("!! SEND error '%d:%s' from %s" % (err[0], err[1],
                      self.addrport()))
                  self.active = False
                  return
              self.bytes_sent += sent
              self.send_buffer = self.send_buffer[sent:]
          else:
              self.send_pending = False
docs: Called by TelnetServer when send data is ready.