Defines | Variables

Transform.cc File Reference

A brief file description. More...

#include "ProxyConfig.h"
#include "P_Net.h"
#include "MimeTable.h"
#include "TransformInternal.h"
#include "HdrUtils.h"
#include "Log.h"
Include dependency graph for Transform.cc:

Go to the source code of this file.

Defines

#define ART   1
#define AGIF   2
#define RETRY()
#define RANGE_NUMBERS_LENGTH   60

Variables

TransformProcessor transformProcessor
static char bound [] = "RANGE_SEPARATOR"
static char range_type [] = "multipart/byteranges; boundary=RANGE_SEPARATOR"
static char cont_type [] = "Content-type: "
static char cont_range [] = "Content-range: bytes "

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Transform thoughts

Transform usage

  1. transformProcessor.open (cont, hooks); - returns "tvc", a TransformVConnection if 'hooks != NULL'
  2. tvc->do_io_write (cont, nbytes, buffer1);
  3. cont->handleEvent (TRANSFORM_READ_READY, NULL);
  4. tvc->do_io_read (cont, nbytes, buffer2);
  5. tvc->do_io_close ();

Transform visualization

         +----+     +----+     +----+     +----+
    -IB->| T1 |-B1->| T2 |-B2->| T3 |-B3->| T4 |-OB->
         +----+     +----+     +----+     +----+
  

Data flows into the first transform in the form of the buffer passed to TransformVConnection::do_io_write (IB). Data flows out of the last transform in the form of the buffer passed to TransformVConnection::do_io_read (OB). Between each transformation is another buffer (B1, B2 and B3).

A transformation is a Continuation. The continuation is called with the event TRANSFORM_IO_WRITE to initialize the write and TRANSFORM_IO_READ to initialize the read.

Definition in file Transform.cc.


Define Documentation

#define AGIF   2

Definition at line 71 of file Transform.cc.

#define ART   1

Definition at line 70 of file Transform.cc.

#define RANGE_NUMBERS_LENGTH   60

Definition at line 965 of file Transform.cc.

Referenced by RangeTransform::add_sub_header().

#define RETRY (  ) 
Value:
if (ink_atomic_increment ((int*) &m_event_count, 1) < 0) { \
        ink_assert (!"not reached"); \
    } \
    eventProcessor.schedule_in (this, HRTIME_MSECONDS (10), ET_NET); \
    return 0;

Definition at line 133 of file Transform.cc.

Referenced by HdrHeap::allocate_str(), HdrHeap::attach_block(), and TransformTerminus::handle_event().


Variable Documentation

char bound[] = "RANGE_SEPARATOR" [static]

Definition at line 944 of file Transform.cc.

Referenced by RangeTransform::add_boundary().

char cont_range[] = "Content-range: bytes " [static]

Definition at line 947 of file Transform.cc.

Referenced by RangeTransform::add_sub_header().

char cont_type[] = "Content-type: " [static]

Definition at line 946 of file Transform.cc.

Referenced by RangeTransform::add_sub_header().

char range_type[] = "multipart/byteranges; boundary=RANGE_SEPARATOR" [static]

Definition at line 945 of file Transform.cc.

Referenced by RangeTransform::change_response_header().