~ubuntu-branches/ubuntu/natty/gnome-vfs/natty

« back to all changes in this revision

Viewing changes to doc/html/gnome-vfs-20-gnome-vfs-socket-buffer.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-17 16:12:58 UTC
  • mfrom: (0.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317161258-px3a2czt9g2ktjz3
Tags: 1:2.24.1-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html>
3
 
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<title>Unified bufferd network I/O</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7
 
<link rel="start" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
8
 
<link rel="up" href="networking.html" title="Networking">
9
 
<link rel="prev" href="gnome-vfs-20-gnome-vfs-socket.html" title="Unified network I/O">
10
 
<link rel="next" href="gnome-vfs-20-gnome-vfs-inet-connection.html" title="Internet connection">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
 
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
14
 
<link rel="chapter" href="data-types.html" title="Basic Data Types">
15
 
<link rel="chapter" href="gnome-vfs-basic-file-ops.html" title="File Operations">
16
 
<link rel="chapter" href="gnome-vfs-directory-ops.html" title="Directory-Specific Operations">
17
 
<link rel="chapter" href="gnome-vfs-file-and-dirs-ops.html" title="Advanced File/Directory Operations">
18
 
<link rel="chapter" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
19
 
<link rel="chapter" href="volumes.html" title="Volumes and Drives Handling">
20
 
<link rel="chapter" href="networking.html" title="Networking">
21
 
<link rel="chapter" href="mime-registry.html" title="MIME Registry">
22
 
<link rel="chapter" href="modules.html" title="Filesystem Modules">
23
 
</head>
24
 
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
 
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
26
 
<tr valign="middle">
27
 
<td><a accesskey="p" href="gnome-vfs-20-gnome-vfs-socket.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
 
<td><a accesskey="u" href="networking.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
 
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
 
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
31
 
<td><a accesskey="n" href="gnome-vfs-20-gnome-vfs-inet-connection.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
 
</tr>
33
 
<tr><td colspan="5" class="shortcuts">
34
 
<a href="#gnome-vfs-20-gnome-vfs-socket-buffer.synopsis" class="shortcut">Top</a>
35
 
                 | 
36
 
                <a href="#gnome-vfs-20-gnome-vfs-socket-buffer.description" class="shortcut">Description</a>
37
 
</td></tr>
38
 
</table>
39
 
<div class="refentry" lang="en">
40
 
<a name="gnome-vfs-20-gnome-vfs-socket-buffer"></a><div class="titlepage"></div>
41
 
<div class="refnamediv"><table width="100%"><tr>
42
 
<td valign="top">
43
 
<h2><span class="refentrytitle"><a name="gnome-vfs-20-gnome-vfs-socket-buffer.top_of_page"></a>Unified bufferd network I/O</span></h2>
44
 
<p>Unified bufferd network I/O — Posix style buffered network input/output.</p>
45
 
</td>
46
 
<td valign="top" align="right"></td>
47
 
</tr></table></div>
48
 
<div class="refsynopsisdiv">
49
 
<a name="gnome-vfs-20-gnome-vfs-socket-buffer.synopsis"></a><h2>Synopsis</h2>
50
 
<pre class="synopsis">
51
 
typedef             <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a>;
52
 
<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a>* <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-new" title="gnome_vfs_socket_buffer_new ()">gnome_vfs_socket_buffer_new</a>       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket);
53
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-destroy" title="gnome_vfs_socket_buffer_destroy ()">gnome_vfs_socket_buffer_destroy</a>     (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
54
 
                                                         gboolean close_socket,
55
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
56
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-read" title="gnome_vfs_socket_buffer_read ()">gnome_vfs_socket_buffer_read</a>        (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
57
 
                                                         gpointer buffer,
58
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
59
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
60
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
61
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-peekc" title="gnome_vfs_socket_buffer_peekc ()">gnome_vfs_socket_buffer_peekc</a>       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
62
 
                                                         char *character,
63
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
64
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-write" title="gnome_vfs_socket_buffer_write ()">gnome_vfs_socket_buffer_write</a>       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
65
 
                                                         gconstpointer buffer,
66
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
67
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written,
68
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
69
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-flush" title="gnome_vfs_socket_buffer_flush ()">gnome_vfs_socket_buffer_flush</a>       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
70
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
71
 
<a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-read-until" title="gnome_vfs_socket_buffer_read_until ()">gnome_vfs_socket_buffer_read_until</a>  (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
72
 
                                                         gpointer buffer,
73
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
74
 
                                                         gconstpointer boundary,
75
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> boundary_len,
76
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
77
 
                                                         gboolean *got_boundary,
78
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
79
 
</pre>
80
 
</div>
81
 
<div class="refsect1" lang="en">
82
 
<a name="gnome-vfs-20-gnome-vfs-socket-buffer.description"></a><h2>Description</h2>
83
 
<p>
84
 
The GnomeVFSSocketBuffer functions are very similar to the GnomeVFSSocket
85
 
ones. The only difference is that all input/output is done through an internally
86
 
managed buffer. This might increase I/O performance as well as give you the
87
 
possibility to use some convenient functions like <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-peekc" title="gnome_vfs_socket_buffer_peekc ()"><span class="type">gnome_vfs_socket_buffer_peekc</span></a>
88
 
and <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-read-until" title="gnome_vfs_socket_buffer_read_until ()"><span class="type">gnome_vfs_socket_buffer_read_until</span></a>.
89
 
</p>
90
 
<p>
91
 
</p>
92
 
<p>
93
 
You can manually force all internally buffered data to get written with
94
 
<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#gnome-vfs-socket-buffer-flush" title="gnome_vfs_socket_buffer_flush ()"><span class="type">gnome_vfs_socket_buffer_flush</span></a>.
95
 
</p>
96
 
</div>
97
 
<div class="refsect1" lang="en">
98
 
<a name="gnome-vfs-20-gnome-vfs-socket-buffer.details"></a><h2>Details</h2>
99
 
<div class="refsect2" lang="en">
100
 
<a name="GnomeVFSSocketBuffer"></a><h3>GnomeVFSSocketBuffer</h3>
101
 
<pre class="programlisting">typedef struct GnomeVFSSocketBuffer GnomeVFSSocketBuffer;
102
 
</pre>
103
 
<p>
104
 
A handle to a socket buffer. A socket buffer is a temporary in-memory storage for data
105
 
that is read from or written to a <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a>.</p>
106
 
<p>
107
 
</p>
108
 
</div>
109
 
<hr>
110
 
<div class="refsect2" lang="en">
111
 
<a name="gnome-vfs-socket-buffer-new"></a><h3>gnome_vfs_socket_buffer_new ()</h3>
112
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a>* gnome_vfs_socket_buffer_new       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket);</pre>
113
 
<p>
114
 
Create a socket buffer around <em class="parameter"><code>socket</code></em>. A buffered
115
 
socket allows data to be poked at without reading it
116
 
as it will be buffered. A future read will retrieve
117
 
the data again.</p>
118
 
<p>
119
 
</p>
120
 
<div class="variablelist"><table border="0">
121
 
<col align="left" valign="top">
122
 
<tbody>
123
 
<tr>
124
 
<td><p><span class="term"><em class="parameter"><code>socket</code></em> :</span></p></td>
125
 
<td> socket to be buffered.
126
 
</td>
127
 
</tr>
128
 
<tr>
129
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
130
 
<td> a newly allocated <a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer"><span class="type">GnomeVFSSocketBuffer</span></a>.
131
 
</td>
132
 
</tr>
133
 
</tbody>
134
 
</table></div>
135
 
</div>
136
 
<hr>
137
 
<div class="refsect2" lang="en">
138
 
<a name="gnome-vfs-socket-buffer-destroy"></a><h3>gnome_vfs_socket_buffer_destroy ()</h3>
139
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_buffer_destroy     (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
140
 
                                                         gboolean close_socket,
141
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
142
 
<p>
143
 
Free the socket buffer.</p>
144
 
<p>
145
 
</p>
146
 
<div class="variablelist"><table border="0">
147
 
<col align="left" valign="top">
148
 
<tbody>
149
 
<tr>
150
 
<td><p><span class="term"><em class="parameter"><code>socket_buffer</code></em> :</span></p></td>
151
 
<td> buffered socket to destroy.
152
 
</td>
153
 
</tr>
154
 
<tr>
155
 
<td><p><span class="term"><em class="parameter"><code>close_socket</code></em> :</span></p></td>
156
 
<td> if <code class="literal">TRUE</code>, the socket being buffered will be closed.
157
 
</td>
158
 
</tr>
159
 
<tr>
160
 
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
161
 
<td> handle allowing cancellation of the operation.
162
 
</td>
163
 
</tr>
164
 
<tr>
165
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
166
 
<td> <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
167
 
</td>
168
 
</tr>
169
 
</tbody>
170
 
</table></div>
171
 
</div>
172
 
<hr>
173
 
<div class="refsect2" lang="en">
174
 
<a name="gnome-vfs-socket-buffer-read"></a><h3>gnome_vfs_socket_buffer_read ()</h3>
175
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_buffer_read        (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
176
 
                                                         gpointer buffer,
177
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
178
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
179
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
180
 
<p>
181
 
Read <em class="parameter"><code>bytes</code></em> bytes of data from the <em class="parameter"><code>socket</code></em> into <em class="parameter"><code>socket_buffer</code></em>.</p>
182
 
<p>
183
 
</p>
184
 
<div class="variablelist"><table border="0">
185
 
<col align="left" valign="top">
186
 
<tbody>
187
 
<tr>
188
 
<td><p><span class="term"><em class="parameter"><code>socket_buffer</code></em> :</span></p></td>
189
 
<td> buffered socket to read data from.
190
 
</td>
191
 
</tr>
192
 
<tr>
193
 
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
194
 
<td> allocated buffer of at least <em class="parameter"><code>bytes</code></em> bytes to be read into.
195
 
</td>
196
 
</tr>
197
 
<tr>
198
 
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
199
 
<td> number of bytes to read from <em class="parameter"><code>socket_buffer</code></em> into <em class="parameter"><code>buffer</code></em>.
200
 
</td>
201
 
</tr>
202
 
<tr>
203
 
<td><p><span class="term"><em class="parameter"><code>bytes_read</code></em> :</span></p></td>
204
 
<td> pointer to a <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a>, will contain
205
 
the number of bytes actually read from the <em class="parameter"><code>socket_buffer</code></em> on return.
206
 
</td>
207
 
</tr>
208
 
<tr>
209
 
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
210
 
<td> handle allowing cancellation of the operation.
211
 
</td>
212
 
</tr>
213
 
<tr>
214
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
215
 
<td> <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
216
 
</td>
217
 
</tr>
218
 
</tbody>
219
 
</table></div>
220
 
</div>
221
 
<hr>
222
 
<div class="refsect2" lang="en">
223
 
<a name="gnome-vfs-socket-buffer-peekc"></a><h3>gnome_vfs_socket_buffer_peekc ()</h3>
224
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_buffer_peekc       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
225
 
                                                         char *character,
226
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
227
 
<p>
228
 
Peek at the next character in <em class="parameter"><code>socket_buffer</code></em> without actually reading
229
 
the character in. The next read will retrieve <em class="parameter"><code>c</code></em> (as well as any following
230
 
data if requested).</p>
231
 
<p>
232
 
</p>
233
 
<div class="variablelist"><table border="0">
234
 
<col align="left" valign="top">
235
 
<tbody>
236
 
<tr>
237
 
<td><p><span class="term"><em class="parameter"><code>socket_buffer</code></em> :</span></p></td>
238
 
<td> the socket buffer to read from.
239
 
</td>
240
 
</tr>
241
 
<tr>
242
 
<td><p><span class="term"><em class="parameter"><code>character</code></em> :</span></p></td>
243
 
<td> pointer to a char, will contain a character on return from
244
 
a successful "peek".
245
 
</td>
246
 
</tr>
247
 
<tr>
248
 
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
249
 
<td> handle allowing cancellation of the operation.
250
 
</td>
251
 
</tr>
252
 
<tr>
253
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
254
 
<td> <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
255
 
</td>
256
 
</tr>
257
 
</tbody>
258
 
</table></div>
259
 
</div>
260
 
<hr>
261
 
<div class="refsect2" lang="en">
262
 
<a name="gnome-vfs-socket-buffer-write"></a><h3>gnome_vfs_socket_buffer_write ()</h3>
263
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_buffer_write       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
264
 
                                                         gconstpointer buffer,
265
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
266
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written,
267
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
268
 
<p>
269
 
Write <em class="parameter"><code>bytes</code></em> bytes of data from <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>socket_buffer</code></em>.</p>
270
 
<p>
271
 
</p>
272
 
<div class="variablelist"><table border="0">
273
 
<col align="left" valign="top">
274
 
<tbody>
275
 
<tr>
276
 
<td><p><span class="term"><em class="parameter"><code>socket_buffer</code></em> :</span></p></td>
277
 
<td> buffered socket to write data to.
278
 
</td>
279
 
</tr>
280
 
<tr>
281
 
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
282
 
<td> data to write to the <em class="parameter"><code>socket_buffer</code></em>.
283
 
</td>
284
 
</tr>
285
 
<tr>
286
 
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
287
 
<td> number of bytes to write from <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>socket_buffer</code></em>.
288
 
</td>
289
 
</tr>
290
 
<tr>
291
 
<td><p><span class="term"><em class="parameter"><code>bytes_written</code></em> :</span></p></td>
292
 
<td> pointer to a <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a>, will contain
293
 
the number of bytes actually written to the <em class="parameter"><code>socket_buffer</code></em> on return.
294
 
</td>
295
 
</tr>
296
 
<tr>
297
 
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
298
 
<td> handle allowing cancellation of the operation.
299
 
</td>
300
 
</tr>
301
 
<tr>
302
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
303
 
<td> <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
304
 
</td>
305
 
</tr>
306
 
</tbody>
307
 
</table></div>
308
 
</div>
309
 
<hr>
310
 
<div class="refsect2" lang="en">
311
 
<a name="gnome-vfs-socket-buffer-flush"></a><h3>gnome_vfs_socket_buffer_flush ()</h3>
312
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_buffer_flush       (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
313
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
314
 
<p>
315
 
Write all outstanding data to <em class="parameter"><code>socket_buffer</code></em>.</p>
316
 
<p>
317
 
</p>
318
 
<div class="variablelist"><table border="0">
319
 
<col align="left" valign="top">
320
 
<tbody>
321
 
<tr>
322
 
<td><p><span class="term"><em class="parameter"><code>socket_buffer</code></em> :</span></p></td>
323
 
<td> buffer to flush.
324
 
</td>
325
 
</tr>
326
 
<tr>
327
 
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
328
 
<td> handle allowing cancellation of the operation.
329
 
</td>
330
 
</tr>
331
 
<tr>
332
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
333
 
<td> <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
334
 
</td>
335
 
</tr>
336
 
</tbody>
337
 
</table></div>
338
 
</div>
339
 
<hr>
340
 
<div class="refsect2" lang="en">
341
 
<a name="gnome-vfs-socket-buffer-read-until"></a><h3>gnome_vfs_socket_buffer_read_until ()</h3>
342
 
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_buffer_read_until  (<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer">GnomeVFSSocketBuffer</a> *socket_buffer,
343
 
                                                         gpointer buffer,
344
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
345
 
                                                         gconstpointer boundary,
346
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> boundary_len,
347
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
348
 
                                                         gboolean *got_boundary,
349
 
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
350
 
<p>
351
 
Read up to <em class="parameter"><code>bytes</code></em> bytes of data from the <em class="parameter"><code>socket_buffer</code></em> into <em class="parameter"><code>buffer</code></em> 
352
 
until boundary is reached. <em class="parameter"><code>got_boundary</code></em> will be set accordingly.
353
 
</p>
354
 
<p>
355
 
Note that if <em class="parameter"><code>bytes</code></em> is smaller than <em class="parameter"><code>boundary_len</code></em> there is no way
356
 
to detected the boundary! So if you want to make sure that every boundary
357
 
is found (in a loop maybe) assure that <em class="parameter"><code>bytes</code></em> is at least as big as 
358
 
<em class="parameter"><code>boundary_len</code></em>.</p>
359
 
<p>
360
 
</p>
361
 
<div class="variablelist"><table border="0">
362
 
<col align="left" valign="top">
363
 
<tbody>
364
 
<tr>
365
 
<td><p><span class="term"><em class="parameter"><code>socket_buffer</code></em> :</span></p></td>
366
 
<td> buffered socket to read data from.
367
 
</td>
368
 
</tr>
369
 
<tr>
370
 
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
371
 
<td> allocated buffer of at least <em class="parameter"><code>bytes</code></em> bytes to be read into.
372
 
</td>
373
 
</tr>
374
 
<tr>
375
 
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
376
 
<td> maximum number of bytes to read from <em class="parameter"><code>socket_buffer</code></em> into <em class="parameter"><code>buffer</code></em>.
377
 
</td>
378
 
</tr>
379
 
<tr>
380
 
<td><p><span class="term"><em class="parameter"><code>boundary</code></em> :</span></p></td>
381
 
<td> the boundary until which is read.
382
 
</td>
383
 
</tr>
384
 
<tr>
385
 
<td><p><span class="term"><em class="parameter"><code>boundary_len</code></em> :</span></p></td>
386
 
<td> the length of the <em class="parameter"><code>boundary</code></em>.
387
 
</td>
388
 
</tr>
389
 
<tr>
390
 
<td><p><span class="term"><em class="parameter"><code>bytes_read</code></em> :</span></p></td>
391
 
<td> pointer to a <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a>, will contain
392
 
the number of bytes actually read from the <em class="parameter"><code>socket_buffer</code></em> on return.
393
 
</td>
394
 
</tr>
395
 
<tr>
396
 
<td><p><span class="term"><em class="parameter"><code>got_boundary</code></em> :</span></p></td>
397
 
<td> pointer to a <span class="type">gboolean</span>  which will be <code class="literal">TRUE</code> if the boundary
398
 
was found or <code class="literal">FALSE</code> otherwise.
399
 
</td>
400
 
</tr>
401
 
<tr>
402
 
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
403
 
<td> handle allowing cancellation of the operation.
404
 
</td>
405
 
</tr>
406
 
<tr>
407
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
408
 
<td> <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
409
 
 
410
 
</td>
411
 
</tr>
412
 
</tbody>
413
 
</table></div>
414
 
<p class="since">Since 2.8</p>
415
 
</div>
416
 
</div>
417
 
</div>
418
 
<div class="footer">
419
 
<hr>
420
 
          Generated by GTK-Doc V1.11</div>
421
 
</body>
422
 
</html>