You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2010/11/06 07:30:02 UTC

svn commit: r1031963 [8/13] - in /trafficserver/site/branches/ats-cms: content/docs/trunk/sdk/ templates/

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnShutdown.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnShutdown.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnShutdown.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnShutdown.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,48 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVConnReadVIOGet) - INKVConnReadVIOGet
+INKVConnWrite - [Next](INKVConnWrite)
+### INKVConnShutdown
+
+Shuts down a vconnection.
+
+**Prototype**
+  ~ `INKReturnCode INKVConnShutdown (INKVConn               <em class="replaceable"><code>connp`,
+    int *`read`*, int *`write`*)
+
+**Description**
+  ~ Shuts down a portion of the vconnection
+    `<em class="replaceable"><code>connp`. If
+    `<em class="replaceable"><code>read` is non-zero, then the read
+    portion of `<em class="replaceable"><code>connp` is also shut down.
+    This indicates that the user does not want to be called back
+    regarding any more read events on this vconnection. If
+    `<em class="replaceable"><code>write` is non-zero, then the write
+    portion of `<em class="replaceable"><code>connp` is shut down,
+    indicating that the user does not want to be called back regarding
+    any more write events on this vconnection.
+
+**Returns**
+  ~ `INK_SUCCESS` if the connection is successfully shut down.
+
+    `INK_ERROR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWrite.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWrite.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWrite.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWrite.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,48 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVConnShutdown) - INKVConnShutdown
+INKVConnWriteVIOGet - [Next](INKVConnWriteVIOGet)
+### INKVConnWrite
+
+Writes a vconnection.
+
+**Prototype**
+  ~ `INKVIO INKVConnWrite (INKVConn               <em class="replaceable"><code>connp`,
+    INKCont *`contp`*, INKIOBufferReader *`readerp`*, int *`nbytes`*)
+
+**Description**
+  ~ Initiates a write operation on the vconnection
+    `<em class="replaceable"><code>connp`. The write operation reads
+    from the buffer reader `<em class="replaceable"><code>readerp`. The
+    continuation `<em class="replaceable"><code>contp` is called back
+    with either `INK_EVENT_ERROR`, `INK_EVENT_VCONN_WRITE_READY` or
+    `INK_EVENT_VCONN_WRITE_COMPLETE` (refer to the
+    [vconnection user's view](IOGuide#VconnectionUsersView "The vconnection user's view")
+    for more information about these events). The number of bytes to
+    write is specified by the `<em class="replaceable"><code>nbytes`
+    parameter.
+
+**Returns**
+  ~ A handle to the vconnection.
+
+    `INK_ERROR_PTR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWriteVIOGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWriteVIOGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWriteVIOGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVConnWriteVIOGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,44 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVConnWrite) - INKVConnWrite
+Netvconnection Functions - [Next](NetvconnectionFunctions)
+### INKVConnWriteVIOGet
+
+Obtains the input VIO for a vconnection.
+
+**Prototype**
+  ~ `INKVIO INKVConnWriteVIOGet (INKVConn               <em class="replaceable"><code>connp`)
+
+**Description**
+  ~ Retrieves the write VIO for a vconnection.
+    `INKVConnWriteVIOGet` should be used by vconnection implementors
+    and not by vconnection users.
+
+    ![[Note]](images/docbook/note.png)
+    Note
+    This API can only be used for transformations.
+
+**Returns**
+  ~ If successful, then a handle to the vconnection is returned.
+
+    `INK_ERROR_PTR` if there is an error.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOContGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOContGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOContGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOContGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,40 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](VIOFunctions) - VIO Functions: INKVIOBufferGet
+INKVIOMutexGet - [Next](INKVIOMutexGet)
+### INKVIOContGet
+
+Gets an `INKVIOCont`.
+
+**Prototype**
+  ~ `INKCont INKVIOContGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets the continuation (user) for the IO operation described by
+    `<em class="replaceable"><code>viop`. This is the continuation the
+    vconnection calls back when progress is made on the IO operation.
+
+**Returns**
+  ~ The continuation for the specified IO operation.
+
+    `INK_ERROR_PTR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOMutexGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOMutexGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOMutexGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOMutexGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,48 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIOContGet) - INKVIOContGet
+INKVIONBytesGet - [Next](INKVIONBytesGet)
+### INKVIOMutexGet
+
+Returns the mutex for the specified IO operation.
+
+**Prototype**
+  ~ `INKMutex INKVIOMutexGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets the mutex for the IO operation described by
+    `<em class="replaceable"><code>viop`. The mutex for the IO
+    operation protects the buffer, continuation, and other VIO members
+    from simultaneous access. The vconnection implementor must obtain
+    the mutex for a VIO before accessing any of its members. Since the
+    VIO mutex is the same as the continuation's mutex, the vconnection
+    user already holds the mutex whenever he is running and doesn't
+    need to worry about grabbing it. To learn more about why
+    vconnection transformations do not need to grab the VIO mutex
+    before accessing their write VIO, see
+    [Transformations](Transformations_IO "Transformations").
+
+**Returns**
+  ~ The mutex for the specified IO operation.
+
+    `INK_ERROR_PTR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,43 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIOMutexGet) - INKVIOMutexGet
+INKVIONBytesSet - [Next](INKVIONBytesSet)
+### INKVIONBytesGet
+
+Returns the number of bytes associated with a specified IO
+operation.
+
+**Prototype**
+  ~ `int INKVIONBytesGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets the number of bytes to be performed by the IO operation
+    described by `<em class="replaceable"><code>viop`. This is the
+    `<i>nbytes </i>` parameter that's passed to `INKVConnRead` or
+    `INKVConnWrite`.
+
+**Returns**
+  ~ The number of bytes associated with the specified IO
+    operation.
+
+    `INK_ERROR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesSet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesSet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesSet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONBytesSet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,51 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIONBytesGet) - INKVIONBytesGet
+INKVIONDoneGet - [Next](INKVIONDoneGet)
+### INKVIONBytesSet
+
+Sets the number of bytes for the specified IO operation.
+
+**Prototype**
+  ~ `INKReturnCode INKVIONBytesSet (INKVIO               <em class="replaceable"><code>viop`,
+    int *`nbytes`*)
+
+**Description**
+  ~ Sets the number of bytes to be performed by the IO operation
+    described by `<em class="replaceable"><code>viop`. Only the user of
+    a vconnection should call `INKVIONBytesSet` and even then, the user
+    should do so very carefully: `INKVIONBytesSet` should only be used
+    to set the number of bytes to be done by the IO operation to a
+    value that's greater than or equal to `INKVIONDoneGet`.
+
+  ~ Common usage of this function is to indicate to a vconnection
+    that enough IO has been performed. The user can indicate to the
+    vconnection that the operation has completed by setting
+    `<i>nbytes </i>` to the number done and then re-enabling the
+    operation.
+
+**Returns**
+  ~ `INK_SUCCESS` if the number of bytes associated with the IO
+    operation is successfully set.
+
+    `INK_ERROR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,43 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIONBytesSet) - INKVIONBytesSet
+INKVIONDoneSet - [Next](INKVIONDoneSet)
+### INKVIONDoneGet
+
+Returns the number of bytes completed for the specified IO
+operation.
+
+**Prototype**
+  ~ `int INKVIONDoneGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets the number of bytes completed on the IO operation
+    described by `<em class="replaceable"><code>viop`. The number of
+    completed bytes is also the number of bytes consumed out of (or
+    produced into) the buffer passed to the IO operation.
+
+**Returns**
+  ~ The number of bytes that have been completed for the specified
+    IO operation.
+
+    `INK_ERROR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneSet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneSet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneSet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONDoneSet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,43 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIONDoneGet) - INKVIONDoneGet
+INKVIONTodoGet - [Next](INKVIONTodoGet)
+### INKVIONDoneSet
+
+Sets the number of bytes completed for the specified IO operation.
+
+**Prototype**
+  ~ `INKReturnCode INKVIONDoneSet (INKVIO               <em class="replaceable"><code>viop`,
+    int *`ndone`*)
+
+**Description**
+  ~ Sets the number of bytes that have been completed on the IO
+    operation described by `<em class="replaceable"><code>viop` to
+    `<em class="replaceable"><code>ndone`. Only vconnection
+    implementors should call `INKVIONDoneSet`.
+
+**Returns**
+  ~ `INK_SUCCESS` if the number of completed bytes associated with
+    the IO operation is successfully set.
+
+    `INK_ERROR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONTodoGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONTodoGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONTodoGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIONTodoGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,48 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIONDoneSet) - INKVIONDoneSet
+INKVIOReaderGet - [Next](INKVIOReaderGet)
+### INKVIONTodoGet
+
+Returns the number of bytes remaining for the specified IO
+operation.
+
+**Prototype**
+  ~ `int INKVIONTodoGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets the number of bytes left to do on the IO operation
+    described by `<em class="replaceable"><code>viop`. The number of
+    bytes left to do = (total \# bytes to perform on the IO operation)
+    - (\# of bytes that have been done on the operation).
+
+    `INKVIONTodoGet` is a convenience function.
+
+**Returns**
+  ~ The number of bytes left that are associated with the specified
+    IO operation.
+
+    `INK_ERROR` if an error occurs.
+
+**Example**
+  ~     INKVIONTodoGet (viop) == INKVIONBytesGet (viop) - INKVIONDoneGet (viop);
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReaderGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReaderGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReaderGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReaderGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,41 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIONTodoGet) - INKVIONTodoGet
+INKVIOReenable - [Next](INKVIOReenable)
+### INKVIOReaderGet
+
+Obtains the buffer reader for the specified IO operation.
+
+**Prototype**
+  ~ `INKIOBufferReader INKVIOReaderGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets a buffer reader for the IO operation described by
+    `<em class="replaceable"><code>viop`. `INKVIOReaderGet` is used by
+    vconnections performing write operations (since write operations
+    read from their buffers).
+
+**Returns**
+  ~ The buffer reader for the specified IO operation.
+
+    `INK_ERROR_PTR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReenable.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReenable.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReenable.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOReenable.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,41 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIOReaderGet) - INKVIOReaderGet
+INKVIOVConnGet - [Next](INKVIOVConnGet)
+### INKVIOReenable
+
+Reenables a VIO.
+
+**Prototype**
+  ~ `INKReturnCode INKVIOReenable (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Reenables the vconnection associated with
+    `<em class="replaceable"><code>viop`. Reenabling a vconnection
+    means that it will wake up and therefore be able to determine that
+    the buffer being used in its IO operation has changed.
+
+**Returns**
+  ~ `INK_SUCCESS` if the vconnection successfully reenables.
+
+    `INK_ERROR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOVConnGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOVConnGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOVConnGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKVIOVConnGet.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,41 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIOReenable) - INKVIOReenable
+IO Buffer Interface Functions -
+[Next](IOBufferInterfaceFunctions)
+### INKVIOVConnGet
+
+Gets a VIO connection.
+
+**Prototype**
+  ~ `INKVConn INKVIOVConnGet (INKVIO               <em class="replaceable"><code>viop`)
+
+**Description**
+  ~ Gets the vconnection associated with the IO operation described
+    by `<em class="replaceable"><code>viop`. This is the vconnection
+    passed to `INKVConnRead` or `INKVConnWrite`.
+
+**Returns**
+  ~ The vconnection for the specified IO operation.
+
+    `INK_ERROR_PTR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfflush.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfflush.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfflush.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfflush.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,37 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKfopenFamilyFunctions) - The INKfopen Family
+INKfgets - [Next](INKfgets)
+### INKfflush
+
+Flushes a file.
+
+**Prototype**
+  ~ `void INKfflush (INKFile               <em class="replaceable"><code>filep`)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>filep` is the file to flush.
+
+**Description**
+  ~ Flushes pending data that has been buffered in memory from
+    previous calls to `INKfwrite`.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfgets.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfgets.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfgets.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfgets.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,50 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKfflush) - INKfflush
+INKfopen - [Next](INKfopen)
+### INKfgets
+
+Reads a line from a file to a buffer.
+
+**Prototype**
+  ~ `char* INKfgets (INKFile               <em class="replaceable"><code>filep`,
+    char *`*buf`*, int *`length`*)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>filep` is the file to read
+    from.
+
+    `<em class="replaceable"><code>buf` is the buffer to read into.
+
+    `<em class="replaceable"><code>length` is the size of the buffer to
+    read into.
+
+**Description**
+  ~ Reads a line from the file pointed to by
+    `<em class="replaceable"><code>filep` into the buffer
+    `<em class="replaceable"><code>buf`. Lines aare terminated by a
+    line feed character, `\n`. The line placed in the buffer includes
+    the line feed character; it is terminated with a `NULL`. If the
+    line is longer than `<i>length</i>` bytes, then only the first
+    `<i>length</i>` - 1 bytes are placed in
+    `<em class="replaceable"><code>buf`.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopen.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopen.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopen.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopen.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,93 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKfgets) - INKfgets
+INKfread - [Next](INKfread)
+### INKfopen
+
+Reads a line from a file to a buffer.
+
+**Prototype**
+  ~ `INKFile INKfopen (const char     <em class="replaceable"><code>*filename`,
+    const char *`*mode`*)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>filename` is the name of the
+    file to open.
+
+    `<em class="replaceable"><code>mode` specifies whether to open the
+    file for reading or writing. If
+    `<span class="replaceable">mode </span>` is:
+
+    -   `<b>r</b>`, then the file is opened for reading.
+    -   `<b>w</b>`, then the file is opened for writing.
+    -   `<b>a</b>`, then the file is opened for appending.
+
+    > Currently `r` ,`w`, and `a` are the only two valid modes for
+    > opening a file.
+
+**Description**
+  ~ Opens a file for reading/writing and returns a descriptor for
+    accessing the file. Descriptors of type `INKFile` can be greater
+    than 256. `INKfopen` can open a file for reading or for writing,
+    but not both (this is a limitation of the current implementation).
+
+**Example**
+  ~ The following example is taken from the append-transform
+    plugin, which appends text to the end of HTTP response bodies. This
+    subroutine loads the text to be added from a file.
+
+        static int
+        load (const char *filename)
+        {
+          INKFile fp;
+          INKIOBufferBlock blk;
+          INKIOBufferData data;
+          char *p;
+          int avail;
+          int err;
+        
+          fp = INKfopen (filename, "r");
+          if (!fp) {
+            return 0;
+          }
+        
+          append_buffer = INKIOBufferCreate ();
+          append_buffer_reader = INKIOBufferReaderAlloc (append_buffer); 
+        
+          for (;;) {
+            blk = INKIOBufferStart (append_buffer);
+            p = INKIOBufferBlockWriteStart (blk, &avail); 
+        
+            err = INKfread (fp, p, avail);
+            if (err > 0) {
+              INKIOBufferProduce (append_buffer, err); 
+            } else {
+              break;
+            }
+          }
+        
+          append_buffer_length = INKIOBufferReaderAvail (append_buffer_reader); 
+        
+          INKfclose (fp);
+          return 1;
+        }
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamily.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamily.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamily.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamily.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,61 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](MiscellaneousInterfaceGuide) - Chapter 9. Miscellaneous
+Interface Guide
+Memory Allocation - [Next](MemoryAllocation)
+## The INKfopen Family
+
+The `fopen` family of functions in C is normally used for reading
+configuration files, since `fgets` is an easy way to parse files on
+a line-by-line basis. The `INKfopen` family of functions aims at
+solving the same problem of buffered IO and line at a time IO in a
+platform-independent manner. The `fopen` family of C library
+functions can only open a file if a file descriptor less than 256
+is available. Since Traffic Server often has more than 2000 file
+descriptors open at once, however, the likelihood of an available
+file descriptor less than 256 very small. To solve this problem,
+the `INKfopen` family can open files with descriptors greater than
+256.
+
+The `INKfopen` family of routines is not intended for high speed IO
+or flexibility - they are blocking APIs (not asynchronous). For
+performance reasons, you should not directly use these APIs on a
+Traffic Server thread (when being called back on an HTTP hook); it
+is better to use a separate thread for doing the blocking IO. The
+`INKfopen` family is intended for reading and writing configuration
+information when corresponding usage of the `fopen` family of
+functions is inappropriate due to file descriptor and portability
+limitations. The `INKfopen` family of functions consists of the
+following:
+
+-   [INKfclose](INKfopenFamilyFunctions#INKfclose "INKfclose")
+
+-   [INKfflush](INKfflush "INKfflush")
+
+-   [INKfgets](INKfgets "INKfgets")
+
+-   [INKfopen](INKfopen "INKfopen")
+
+-   [INKfread](INKfread "INKfread")
+
+-   [INKfwrite](INKfwrite "INKfwrite")
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamilyFunctions.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamilyFunctions.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamilyFunctions.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfopenFamilyFunctions.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,69 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKReleaseAssert) - INKReleaseAssert
+INKfflush - [Next](INKfflush)
+## The INKfopen Family
+
+The `fopen` family of functions in C is normally used for reading
+configuration files, since `fgets` is an easy way to parse files on
+a line-by-line basis. The `INKfopen` family of functions is
+intended to solve the same problem of buffered IO and line at a
+time IO, in a platform-independent manner. The `fopen` family of C
+library functions can only open a file if a file descriptor less
+than 256 is available. Since Traffic Server often has more than
+2000 file descriptors open at once, however, the likelihood of an
+available file descriptor less than 256 very small. The `INKfopen`
+family can open files with descriptors greater than 256.
+
+The `INKfopen` family of routines is not intended for high speed IO
+or flexibility. These routines are intended for reading and writing
+configuration information when corresponding usage of the `fopen`
+family of functions is inappropriate because of file descriptor and
+portability limitations. The `INKfopen` family of functions
+consists of the functions below.
+
+-   [**INKfclose**](INKfopenFamilyFunctions#INKfclose)
+-   **[INKfflush](INKfflush)**
+-   **[INKfgets](INKfgets)**
+-   **[INKfopen](INKfopen)**
+-   **[INKfread](INKfread)**
+-   **[INKfwrite](INKfwrite)**
+
+### INKfclose
+
+Closes a file.
+
+**Prototype**
+  ~ `void INKfclose (INKFile               <em class="replaceable"><code>filep`)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>filep` is the file to close.
+
+**Description**
+  ~ Closes the file pointed to by
+    `<em class="replaceable"><code>filep` and frees the data structures
+    & buffers associated with it. If the file was opened for writing,
+    then any pending data is flushed.
+
+**Example**
+  ~ See the example for [INKfopen](INKfopen "INKfopen").
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfread.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfread.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfread.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfread.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,54 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKfopen) - INKfopen
+INKfwrite - [Next](INKfwrite)
+### INKfread
+
+Reads a specified number of bytes from a file to a buffer.
+
+**Prototype**
+  ~ `int INKfread (INKFile               <em class="replaceable"><code>filep`,
+    void *`*buf`*, int *`length`*)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>filep` is the file to read
+    from.
+
+    `<em class="replaceable"><code>buf` is the buffer to read into.
+
+    `<em class="replaceable"><code>length` is the amount of data to
+    read.
+
+**Description**
+  ~ Attempts to read `<em class="replaceable"><code>length` bytes
+    of data from the file pointed to by
+    `<em class="replaceable"><code>filep` into the buffer
+    `<em class="replaceable"><code>buf`. If the file was not opened for
+    reading, then `<code class="function">INKfread` returns `-1`. If an
+    error occurs while reading the file, then
+    `<code class="function">INKfread` returns `-1`. If the end of the
+    file is reached, then `INKfread` returns `0`; otherwise, `INKfread`
+    returns the number of bytes read.
+
+**Example**
+  ~ See the example for [INKfopen](INKfopen "INKfopen").
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfwrite.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfwrite.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfwrite.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKfwrite.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,50 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKfread) - INKfread
+Memory Allocation - [Next](MemoryAllocationFunctions)
+### INKfwrite
+
+Writes a specified number of bytes to a file.
+
+**Prototype**
+  ~ `int INKfwrite (INKFile <i class="replaceable">filep</i>, void *<i class="replaceable">buf</i>, int       <i class="replaceable">length</i>)`
+
+**Arguments**
+  ~ `<em class="replaceable"><code>filep` is the file to write to.
+
+    `<em class="replaceable"><code>buf` is the buffer that contains the
+    data to be written.
+
+    `<em class="replaceable"><code>length` is the amount of data to
+    write to `<em class="replaceable"><code>filep`.
+
+**Description**
+  ~ Attempts to write `<em class="replaceable"><code>length` bytes
+    of data to the file pointed to by
+    `<em class="replaceable"><code>filep` from the buffer
+    `<em class="replaceable"><code>buf`. If the file was not opened for
+    writing, then `INKfwrite` returns `-1`. Otherwise, `INKfwrite`
+    returns the number of bytes written. The number of bytes written is
+    equal to `<em class="replaceable"><code>length` (unless an error
+    occurs when writing data to the file). One common error, for
+    example, is an insufficient amount of space on disk.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKmalloc.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKmalloc.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKmalloc.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKmalloc.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,44 @@
+[![image](images/docbook/ts75.png)](/index)™
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](MemoryAllocationFunctions) - Memory Allocation
+INKrealloc - [Next](INKrealloc)
+### INKmalloc
+
+Allocates memory.
+
+**Prototype**
+  ~ `void* INKmalloc (unsigned int               <em class="replaceable"><code>size`)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>size` is the number of bytes to
+    allocate.
+
+**Description**
+  ~ Returns a pointer to *`size`* bytes of memory allocated from
+    the heap. Traffic Server uses `INKmalloc` internally for memory
+    allocations. Always use `INKfree` to release memory allocated by
+    `INKmalloc`; do not use `free`.
+
+**Returns**
+  ~ A pointer to the newly-allocated memory.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKrealloc.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKrealloc.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKrealloc.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKrealloc.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,53 @@
+[![image](images/docbook/ts75.png)](/index)™
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKmalloc) - INKmalloc
+INKstrdup - [Next](INKstrdup)
+### INKrealloc
+
+Changes the size of an allocated block of memory.
+
+**Prototype**
+  ~ `void* INKrealloc (void               <em class="replaceable"><code>*ptr`,
+    unsigned int *`size`*)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>ptr` is a pointer to the memory
+    to reallocate.
+
+    `<em class="replaceable"><code>size` is the number of bytes to
+    allocate.
+
+**Description**
+  ~ Changes the size of the memory block pointed to by
+    `<em class="replaceable"><code>ptr` to
+    `<em class="replaceable"><code>size` bytes, and returns a pointer
+    to the new block. Because it may not be possible to simply extend
+    `<em class="replaceable"><code>ptr` to satisfy a request to
+    increase the allocated block, the returned pointer might point to a
+    new block of memory. If `<em class="replaceable"><code>ptr` is
+    `NULL`, then `INKrealloc` behaves like `INKmalloc` and returns a
+    pointer to the newly-allocated memory.
+
+**Returns**
+  ~ A pointer to the reallocated memory.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrdup.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrdup.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrdup.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrdup.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,51 @@
+[![image](images/docbook/ts75.png)](/index)™
+# Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKrealloc) - INKrealloc
+INKstrndup - [Next](INKstrndup)
+### INKstrdup
+
+Returns a pointer to a duplicate string.
+
+**Prototype**
+  ~ `char* INKstrdup (const char               *<em class="replaceable"><code>str`)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>str` is a pointer to the
+    null-terminated string to duplicate.
+
+**Description**
+  ~ Returns a pointer to a new string that's a duplicate of the
+    string pointed to by `<em class="replaceable"><code>str`. The
+    memory for the new string is allocated using `INKmalloc` and should
+    be freed by a call to `INKfree`.
+
+**Returns**
+  ~ A pointer to the duplicated string.
+
+    ![[Note]](images/docbook/note.png)
+    Note
+    A valid null-terminated string may not be returned if the input
+    `<em class="replaceable"><code>str` argument is not a valid pointer
+    (i.e. a `NULL` argument would simply cause `INKstrdup` to return
+    `NULL`).
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrndup.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrndup.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrndup.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKstrndup.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,59 @@
+[![image](images/docbook/ts75.png)](/index)™
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKstrdup) - INKstrdup
+Thread Functions - [Next](ThreadFunctions)
+### INKstrndup
+
+Returns a pointer to a duplicate string of specified length.
+
+**Prototype**
+  ~ `char* INKstrndup (const char               *<em class="replaceable"><code>str`,
+    int *`length`*)
+
+**Arguments**
+  ~ `<em class="replaceable"><code>str` is a pointer to the string
+    to duplicate.
+
+    `<em class="replaceable"><code>length` is the length of the string
+    to duplicate.
+
+**Description**
+  ~ Returns a pointer to a new string that's a duplicate of the
+    string pointed to by `<em class="replaceable"><code>str` which is
+    `<em class="replaceable"><code>length` bytes long. The new string
+    will be null-terminated. This API is very useful for transforming
+    non-null terminated string values (returned by APIs such as
+    `INKMimeHdrFieldStringValueGet`) into null-terminated string
+    values. The memory for the new string is allocated using
+    `INKmalloc` and should be freed by a call to `INKfree`.
+
+**Returns**
+  ~ A pointer to the duplicated string.
+
+    ![[Note]](images/docbook/note.png)
+    Note
+    A valid null-terminated string may not be returned if the input
+    `<em class="replaceable"><code>str` argument is not a valid pointer
+    (i.e. a `NULL` argument would simply cause `INKstrndup` to return
+    `NULL`).
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBufferInterfaceFunctions.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBufferInterfaceFunctions.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBufferInterfaceFunctions.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBufferInterfaceFunctions.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,61 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](INKVIOReenable) - INKVIOReenable
+INKIOBufferBlockReadAvail - [Next](INKIOBufferBlockReadAvail)
+## IO Buffer Interface
+
+****
+[INKIOBufferBlockNext](IOBufferInterfaceFunctions#INKIOBufferBlockNext)
+[INKIOBufferBlockReadAvail](INKIOBufferBlockReadAvail)
+[INKIOBufferBlockReadStart](INKIOBufferBlockReadStart)
+[INKIOBufferBlockWriteAvail](INKIOBufferBlockWriteAvail)
+[INKIOBufferBlockWriteStart](INKIOBufferBlockWriteStart)
+[INKIOBufferCopy](INKIOBufferCopy)
+[INKIOBufferCreate](INKIOBufferCreate)
+[INKIOBufferDestroy](INKIOBufferDestroy)
+[INKIOBufferProduce](INKIOBufferProduce)
+[INKIOBufferReaderAlloc](INKIOBufferReaderAlloc)
+[INKIOBufferReaderAvail](INKIOBufferReaderAvail)
+[INKIOBufferReaderClone](INKIOBufferReaderClone)
+[INKIOBufferReaderConsume](INKIOBufferReaderConsume)
+[INKIOBufferReaderFree](INKIOBufferReaderFree)
+[INKIOBufferReaderStart](INKIOBufferReaderStart)
+[INKIOBufferSizedCreate](INKIOBufferSizedCreate)
+[INKIOBufferStart](INKIOBufferStart)
+[INKIOBufferWaterMarkGet](INKIOBufferWaterMarkGet)
+[INKIOBufferWaterMarkSet](INKIOBufferWaterMarkSet)
+[INKIOBufferWrite](INKIOBufferWrite)
+### INKIOBufferBlockNext
+
+Gets the next IO buffer block.
+
+**Prototype**
+  ~ `INKIOBufferBlock INKIOBufferBlockNext               (INKIOBufferBlock               <em class="replaceable"><code>blockp`)
+
+**Description**
+  ~ Gets the next block in the buffer block chain.
+
+**Returns**
+  ~ The next IO buffer block.
+
+    `INK_ERROR_PTR` if an error occurs.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBuffers_IO.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBuffers_IO.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBuffers_IO.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOBuffers_IO.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,57 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](VIOs_IO) - VIOs
+Guide to the Cache API - [Next](CacheAPI)
+## IO Buffers
+
+The IO buffer data structure is the building block of the
+vconnection abstraction. An **IO buffer** (`INKIOBuffer`) is
+composed of a list of buffer blocks that point to buffer data. Both
+the buffer block (`INKIOBufferBlock`) and buffer data
+(`INKIOBufferData`) data structures are reference-counted, so they
+can reside in multiple buffers at the same time. This makes it
+extremely efficient to copy data from one IO buffer to another via
+`INKIOBufferCopy`, since Traffic Server must only copy pointers and
+adjust reference counts appropriately (and doesn't actually copy
+any data).
+
+The IO buffer abstraction provides for a single writer and multiple
+readers. In order for the readers to have no knowledge of each
+other, they manipulate IO buffers through the `INKIOBufferReader`
+data structure. Since only a single writer is allowed, there is no
+corresponding `INKIOBufferWriter` data structure. The writer simply
+modifies the IO buffer directly. To see an example that illustrates
+how to use IOBuffers, refer to the sample code in the description
+of
+[`INKIOBufferBlockReadStart`](INKIOBufferBlockReadStart "INKIOBufferBlockReadStart").
+
+Additional information about IO buffer functions:
+
+-   The `INKIOBufferReader` data structure tracks how much data in
+    `INKIOBuffer` has been read. It has an offset number of bytes that
+    is the current start point of a particular buffer reader (for every
+    read operation on an `INKIOBuffer`, you must allocate an
+    `INKIOBufferReader`).
+
+-   Bytes that have already been read may not necessarily be freed
+    within the `INKIOBuffer`. To consume bytes that have been read, you
+    must call `INKIOBufferConsume`.
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOGuide.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOGuide.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOGuide.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/IOGuide.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,195 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](HostsLookupAPI) - Hosts Lookup API
+Net Vconnections - [Next](NetVconnections)
+## Chapter 15. IO Guide
+
+This chapter contains the following sections:
+
+****
+[Vconnections](IOGuide#Vconnections "Vconnections")
+[Net Vconnections](NetVconnections "Net Vconnections")
+[Transformations](Transformations_IO "Transformations")
+[VIOs](HTTPTransformationPlugins#VIOs "VIOs")
+[IO Buffers](HTTPTransformationPlugins#IOBuffers "IO Buffers")
+[Guide to the Cache API](CacheAPI "Guide to the Cache API")
+-   [How to Do a Cache Read](CacheAPI#DoACacheRead)
+-   [How to Do a Cache Write](DoACacheWrite)
+-   [How to Do a Cache Remove](DoACacheRemove)
+-   [Errors](Errors_Cache)
+-   [Example](CacheAPI_Example)
+
+## Vconnections
+
+
+
+### Vconnections: a User's Perspective
+
+To use a vconnection, a user must first get a handle to one. This
+is usually accomplished by having it handed to the user; the user
+may also simply issue a call that creates a vconnection (such as
+`INKNetConnect)`. In the case of transform plugins, the plugin
+creates a transformation vconnection viav `INKTransformCreate` and
+then accesses the output vconnection using
+`INKTransformOutputVConnGet`.
+
+After getting a handle to a vconnection, the user can then issue a
+read or write call. It's important to note that not all
+vconnections support both reading and writing - as of yet, there
+has not been a need to query a vconnection about whether it can
+perform a read or write operation. That ability should be obvious
+from context.
+
+To issue a read or write operation, a user calls `INKVConnRead` or
+`INKVConnWrite`. These two operations both return `VIO (INKVIO)`.
+The VIO describes the operation being performed and how much
+progress has been made. Transform plugins initiate output to the
+downstream vconnection by calling `INKVConnWrite`.
+
+A vconnection read or write operation is different from a normal
+UNIX `read(2)` or `write(2)` operation. Specifically, the
+vconnection operation can specify more data to be read or written
+than exists in the buffer handed to the operation. For example,
+it's typical to issue a read for `INT_MAX` (4 billion) bytes from a
+network vconnection in order to read all the data from the network
+connection until the end of stream is reached. This contrasts with
+the usual UNIX fashion of issuing repeated calls to `read(2)` until
+one of the calls finally returns `0` to indicate the end of stream
+was reached (indeed, the underlying implementation of vconnections
+on UNIX still does issue those calls to `read(2)`, but the
+interface does not expose that detail).
+
+At most, a given vconnection can have one read operation and one
+write operation being performed on it. This is restricted both by
+design and common sense: if two write operations were performed on
+a single vconnection, then the user would not be able to specify
+which should occur first and the output would occur in an
+intermingled fashion. Note that both a read operation and a write
+operation can happen on a single vconnection at the same time; the
+restriction is for more than one operation of the same type.
+
+One obvious issue is that the buffer passed to `INKVConnRead` and
+`INKVConnWrite` won't be large enough - there is no reasonable way
+to make a buffer that can hold `INT_MAX` (4 billion) bytes! The
+secret is that vconnections engage in a protocol whereby they
+signal to the user (via the continuation passed to `INKVConnRead`
+and `INKVConnWrite`) that they have emptied the buffers passed to
+them and are ready for more data. When this occurs, it is up to the
+user to add more data to the buffers (or wait for more data to be
+added) and then wake up the vconnection by calling `INKVIOReenable`
+on the VIO describing the operation. `INKVIOReenable` specifies
+that the buffer for the operation has been modified and that the
+vconnection should reexamine it to see if it can make further
+progress.
+
+The null transform plugin provides an example of how this is done.
+Below is a prototype for `INKVConnWrite`:
+
+    INKVIO INKVConnWrite (INKVConn connp, INKCont contp, INKIOBufferReader readerp, int nbytes)
+
+The `connp` is the vconnection the user is writing to and `contp`
+is the "user" – i.e., the continuation that `connp` calls back when
+it has emptied its buffer and is ready for more data.
+
+The call made in the null transform plugin is:
+
+    INKVConnWrite (output_conn, contp, data->output_reader, INKVIONBytesGet (input_vio));
+
+In the example above, `contp` is the transformation vconnection
+that is writing to the output vconnection. The number of bytes to
+be written is obtained from `input_vio` by `INKVIONBytesGet`.
+
+When a vconnection calls back its user to indicate that it wants
+more data (or when some other condition has occurred), it issues a
+call to `INKContCall`. It passes the `INKVIO` describing the
+operation as the data parameter, and one of the values below as the
+event parameter.
+
+**Event Parameter Value**
+**Description**
+`INK_EVENT_ERROR`
+Indicates an error has occurred on the vconnection. This will
+happen for network IO if the underlying `read(2)` or `write(2)`
+call returns an error.
+`INK_EVENT_VCONN_READ_READY`
+The vconnection has placed data in the buffer passed to an
+`INKVConnRead` operation and it would like to do more IO, but the
+buffer is now full. When the user consumes the data from the
+buffer, this should re-enable the VIO so it indicates to the
+vconnection that the buffer has been modified.
+`INK_EVENT_VCONN_WRITE_READY`
+The vconnection has removed data from the buffer passed to an
+`INKVConnWrite` operation and it would like to do more IO, but the
+buffer does not have enough data in it. When placing more data in
+the buffer, the user should re-enable the VIO so it indicates to
+the vconnection that the buffer has been modified.
+`INK_EVENT_VCONN_READ_COMPLETE`
+The vconnection has read all the bytes specified by an
+`INKVConnRead` operation. The vconnection can now be used to
+initiate a new IO operation.
+`INK_EVENT_VCONN_WRITE_COMPLETE`
+The vconnection has written all the bytes specified by an
+`INKVConnWrite` operation and can now be used to initiate a new IO
+operation.
+`INK_EVENT_VCONN_EOS`
+An attempt was made to read past the end of the stream of bytes
+during the handling of an `INKVConnRead` operation. This event
+occurs when the number of bytes available for reading from a
+vconnection is less than the number of bytes the user specifies
+should be read from the vconnection in a call to `INKVConnRead`. A
+common case where this occurs is when the user specifies that
+`INT_MAX` bytes are to be read from a network connection.
+For example: the null transform plugin's transformation receives
+`INK_EVENT_VCONN_WRITE_READY` and `INK_EVENT_VCONN_WRITE_COMPLETE`
+events from the downstream vconnection as a result of the call to
+`INKVConnWrite`.
+
+After using a vconnection, the user must call `INKVConnClose` or
+`INKVConnAbort`. While both calls indicate that the vconnection can
+destroy itself, `INKVConnAbort` should be used when the connection
+is being closed abnormally. After a call to `INKVConnClose` or
+`INKVConnAbort`, the user will not be called back by the
+vconnection again.
+
+Sometimes it's desirable to simply close down the write portion of
+a connection while keeping the read portion open. This can be
+accomplished via the `INKVConnShutdown` function, which shuts down
+either the read or write portion of a vconnection. *Shutdown* means
+that the vconnection will no longer call back the user with events
+for the portion of the connection that was shut down. For example:
+if the user shuts down the write portion of a connection, then the
+`INK_EVENT_VCONN_WRITE_READY` or `INK_EVENT_VCONN_WRITE_COMPLETE`
+events will not be produced. In the null transform plugin, the
+write operation is shut down with a call to `INKVConnShutdown`. To
+learn how vconnections are used in transformation plugins, see
+[Writing Content Transform Plugins](HTTPTransformationPlugins#WritingContentTransformPlugins "Writing Content Transform Plugins").
+
+The vconnection functions are listed below:
+
+****
+[INKVConnAbort](VconnectionFunctions#INKVConnAbort)
+[INKVConnClose](INKVConnClose)
+[INKVConnClosedGet](INKVConnClosedGet)
+[INKVConnRead](INKVConnRead)
+[INKVConnReadVIOGet](INKVConnReadVIOGet)
+[INKVConnShutdown](INKVConnShutdown)
+[INKVConnWrite](INKVConnWrite)
+[INKVConnWriteVIOGet](INKVConnWriteVIOGet)
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/ImplementHandler_GetTransHandle.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/ImplementHandler_GetTransHandle.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/ImplementHandler_GetTransHandle.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/ImplementHandler_GetTransHandle.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,47 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](BasicAuthorizatonPlugin) - The Basic Authorization
+Plugin
+Working With HTTP Headers - [Next](WorkWithHTTPHeaders)
+### Implementing the Handler and Getting a Handle to the Transaction
+
+The handler function for the plugin's parent continuation is
+implemented as follows:
+
+    static int
+    auth_plugin (INKCont contp, INKEvent event, void *edata)
+    {
+
+         INKHttpTxn txnp = (INKHttpTxn) edata;
+         switch (event) {
+         case INK_EVENT_HTTP_OS_DNS:
+              handle_dns (txnp, contp);
+              return 0;
+         case INK_EVENT_HTTP_SEND_RESPONSE_HDR:
+              handle_response (txnp);
+              return 0;
+         default:
+              break;
+         }
+
+         return 0;
+    }
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitializationFunctions.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitializationFunctions.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitializationFunctions.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitializationFunctions.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,53 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](FunctionReference) - Chapter 18. Function Reference
+INKPluginRegister - [Next](INKPluginRegister)
+## Initialization Functions
+
+-   [**INKPluginInit**](InitializationFunctions#INKPluginInit)
+-   **[INKPluginRegister](INKPluginRegister)**
+-   **[INKTrafficServerVersionGet](INKTrafficServerVersionGet)**[](INKTrafficServerVersionGet)
+
+### INKPluginInit
+
+**Prototype**
+  ~ `void INKPluginInit (int <code class="replaceable">argc`, const
+    char `*<span class="replaceable">argv</span> []`)
+
+**Arguments**
+  ~ `<code class="replaceable">argc` is a count of the number of
+    arguments in the argument vector,
+    `<code class="varname"><span class="replaceable"> argv</span>`. The
+    count has a value of at least one because the first argument in the
+    argument vector is the plugin's name, which must exist in order for
+    the plugin to be loaded.
+
+    `<code class="varname"><span class="replaceable">argv</span>` is
+    the vector of arguments. The number of arguments in the vector is
+    `<code class="replaceable">argc`; `argv[0]` always contains the
+    name of the plugin shared library.
+
+**Description**
+  ~ This function must be defined by all plugins. Traffic Server
+    calls this initialization routine when it loads the plugin and sets
+    `argc` and `argv` based on the values in `plugin.config`.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateConnectionFunctions.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateConnectionFunctions.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateConnectionFunctions.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateConnectionFunctions.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,79 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](HTTPTransactionFunctions) - HTTP Transaction Functions
+Intercepting HTTP Transaction Functions -
+[Next](InterceptingHTTPTransactionFuncs)
+## Initiate Connection
+
+### INKHttpConnect
+
+Sends an HTTP request through the Traffic Server HTTP SM.
+
+**Prototype**
+  ~ `InkReturnCode INKHttpConnect (unsigned int               <em class="replaceable"><code>ip`,
+    int *`port`*, INKVConn \**`vc`*)
+
+**Arguments**
+  ~ `unsigned int``<em class="replaceable"><code>ip` is the IP
+    address used to set the value of the vconnection remote IP address.
+    This is equivalent to a client IP address, or the IP from which the
+    connection originated. Value is in host byte order.
+
+    `int``<em class="replaceable"><code>port` is the port used to set
+    the value of the vconnection remote port. This is equivalent to a
+    client port, or the port from which the connection originated. The
+    value is in host byte order.
+
+    `INKVConn               *``<em class="replaceable"><code>vc` is the
+    vconnection returned.
+
+    Once the vconnection is established, you can use regular
+    vconnection operations (`INKVConnRead`, `INKVConnWrite`, etc).
+
+**Description**
+  ~ Sends an HTTP request through the Traffic Server HTTP SM. The
+    HTTP request goes through the Traffic Server the same way a request
+    from a client (such as a browser) does. A typical usage scenario is
+    as follows:
+
+    -   Call `INKHttpConnect`.
+
+    -   Use `INKVConnWrite` to send an HTTP request.
+
+    -   Use `INKVConnRead` to get the HTTP response.
+
+    -   Use `INKHttpParser` to parse the response (if needed).
+
+
+    **Note:** the request and response go through the Traffic Server
+    HTTP SM. The request and the response can be cached and the
+    transaction will be logged in `squid.log`.
+
+    Also note that the IP address passed to `INKHttpConnect` will be
+    used as the client IP address in `squid.log`
+
+**Returns**
+  ~ `INK_SUCCESS` if the API is called successfully.
+
+    `INK_ERROR` if an error occurs while calling the API or if an
+    argument is invalid.
+
+
 
 

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateHTTPConnection.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateHTTPConnection.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateHTTPConnection.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/InitiateHTTPConnection.en.mdtext Sat Nov  6 06:29:56 2010
@@ -1,2 +1,30 @@
+Title: Apache Traffic Server™ Software Developers Kit
+Notice:    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.
+
+[Prev](InterceptingHTTPTx) - Intercepting HTTP Transactions
+HTTP Alternate Selection - [Next](HTTPAlternateSelection)
+## Initiate HTTP Connection
+
+This function enables plugins to initiate HTTP transactions. The
+initiate HTTP connection function is:
+
+-   [INKHttpConnect](InitiateConnectionFunctions#INKHttpConnect "INKHttpConnect")
+
+