~adam-stokes/ubuntu/quantal/gnome-vfs/lp977940-multiarch

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-08-05 10:31:15 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080805103115-5vkex0yk6qq619x5
Tags: 1:2.23.0-0ubuntu1
* New upstream version:
  - Sync xdgmime with GIO
* debian/patches/90_from_svn_no_range_for_youtube.patch:
  - the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Unified network I/O</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
 
<link rel="start" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
7
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
8
8
<link rel="up" href="networking.html" title="Networking">
9
9
<link rel="prev" href="gnome-vfs-20-gnome-vfs-ssl.html" title="SSL support functions">
10
10
<link rel="next" href="gnome-vfs-20-gnome-vfs-socket-buffer.html" title="Unified bufferd network I/O">
11
 
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
14
14
<link rel="chapter" href="data-types.html" title="Basic Data Types">
30
30
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
31
31
<td><a accesskey="n" href="gnome-vfs-20-gnome-vfs-socket-buffer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
32
</tr>
33
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2687707" class="shortcut">Top</a>
34
 
                  &#160;|&#160;
35
 
                  <a href="#id2688161" class="shortcut">Description</a></nobr></td></tr>
 
33
<tr><td colspan="5" class="shortcuts"><nobr><a href="#gnome-vfs-20-gnome-vfs-socket.synopsis" class="shortcut">Top</a>
 
34
                   | 
 
35
                  <a href="#gnome-vfs-20-gnome-vfs-socket.description" class="shortcut">Description</a></nobr></td></tr>
36
36
</table>
37
37
<div class="refentry" lang="en">
38
38
<a name="gnome-vfs-20-gnome-vfs-socket"></a><div class="titlepage"></div>
39
39
<div class="refnamediv"><table width="100%"><tr>
40
40
<td valign="top">
41
 
<h2>
42
 
<a name="id2687707"></a><span class="refentrytitle">Unified network I/O</span>
43
 
</h2>
44
 
<p>Unified network I/O &#8212; Posix style network input/output functions.</p>
 
41
<h2><span class="refentrytitle"><a name="gnome-vfs-20-gnome-vfs-socket.top_of_page"></a>Unified network I/O</span></h2>
 
42
<p>Unified network I/O — Posix style network input/output functions.</p>
45
43
</td>
46
44
<td valign="top" align="right"></td>
47
45
</tr></table></div>
48
46
<div class="refsynopsisdiv">
49
 
<h2>Synopsis</h2>
 
47
<a name="gnome-vfs-20-gnome-vfs-socket.synopsis"></a><h2>Synopsis</h2>
50
48
<pre class="synopsis">
51
 
 
52
 
 
53
 
 
54
 
typedef             <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a>;
55
 
                    <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl">GnomeVFSSocketImpl</a>;
56
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketReadFunc">*GnomeVFSSocketReadFunc</a>)           (gpointer connection,
57
 
                                                         gpointer buffer,
58
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
59
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read_out,
60
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
61
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketWriteFunc">*GnomeVFSSocketWriteFunc</a>)          (gpointer connection,
62
 
                                                         gconstpointer buffer,
63
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
64
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written_out,
65
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
66
 
void                (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketCloseFunc">*GnomeVFSSocketCloseFunc</a>)          (gpointer connection,
67
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
68
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketSetTimeoutFunc">*GnomeVFSSocketSetTimeoutFunc</a>)     (gpointer connection,
69
 
                                                         GTimeVal *timeout,
70
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
71
 
<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a>*     <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-new">gnome_vfs_socket_new</a>                (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl">GnomeVFSSocketImpl</a> *impl,
 
49
typedef             <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a>;
 
50
                    <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl">GnomeVFSSocketImpl</a>;
 
51
<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.html#GnomeVFSSocketReadFunc" title="GnomeVFSSocketReadFunc ()">*GnomeVFSSocketReadFunc</a>)           (<a
 
52
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
53
>gpointer</a> connection,
 
54
                                                         <a
 
55
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
56
>gpointer</a> buffer,
 
57
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
 
58
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read_out,
 
59
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
60
<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.html#GnomeVFSSocketWriteFunc" title="GnomeVFSSocketWriteFunc ()">*GnomeVFSSocketWriteFunc</a>)          (<a
 
61
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
62
>gpointer</a> connection,
 
63
                                                         <a
 
64
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
65
>gconstpointer</a> 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_out,
 
68
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
69
void                (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketCloseFunc" title="GnomeVFSSocketCloseFunc ()">*GnomeVFSSocketCloseFunc</a>)          (<a
 
70
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
71
>gpointer</a> connection,
 
72
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
73
<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.html#GnomeVFSSocketSetTimeoutFunc" title="GnomeVFSSocketSetTimeoutFunc ()">*GnomeVFSSocketSetTimeoutFunc</a>)     (<a
 
74
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
75
>gpointer</a> connection,
 
76
                                                         <a
 
77
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
 
78
>GTimeVal</a> *timeout,
 
79
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
80
<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a>*     <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-new" title="gnome_vfs_socket_new ()">gnome_vfs_socket_new</a>                (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl">GnomeVFSSocketImpl</a> *impl,
72
81
                                                         void *connection);
73
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-write">gnome_vfs_socket_write</a>              (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
74
 
                                                         gconstpointer buffer,
 
82
<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.html#gnome-vfs-socket-write" title="gnome_vfs_socket_write ()">gnome_vfs_socket_write</a>              (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
83
                                                         <a
 
84
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
85
>gconstpointer</a> buffer,
75
86
                                                         int bytes,
76
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written,
77
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
78
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-close">gnome_vfs_socket_close</a>              (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
79
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
80
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-read">gnome_vfs_socket_read</a>               (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
81
 
                                                         gpointer buffer,
82
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
83
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
84
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
85
 
void                <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-free">gnome_vfs_socket_free</a>               (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket);
86
 
<a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-set-timeout">gnome_vfs_socket_set_timeout</a>        (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
87
 
                                                         GTimeVal *timeout,
88
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
87
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written,
 
88
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
89
<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.html#gnome-vfs-socket-close" title="gnome_vfs_socket_close ()">gnome_vfs_socket_close</a>              (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
90
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
91
<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.html#gnome-vfs-socket-read" title="gnome_vfs_socket_read ()">gnome_vfs_socket_read</a>               (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
92
                                                         <a
 
93
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
94
>gpointer</a> buffer,
 
95
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
 
96
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
 
97
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
 
98
void                <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-free" title="gnome_vfs_socket_free ()">gnome_vfs_socket_free</a>               (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket);
 
99
<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.html#gnome-vfs-socket-set-timeout" title="gnome_vfs_socket_set_timeout ()">gnome_vfs_socket_set_timeout</a>        (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
100
                                                         <a
 
101
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
 
102
>GTimeVal</a> *timeout,
 
103
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);
89
104
</pre>
90
105
</div>
91
106
<div class="refsect1" lang="en">
92
 
<a name="id2688161"></a><h2>Description</h2>
 
107
<a name="gnome-vfs-20-gnome-vfs-socket.description"></a><h2>Description</h2>
93
108
<p>
94
109
The GnomeVFSSocket function family unifies network I/O through functions
95
110
similar to the standard POSIX read/write functions. The main difference is
96
111
that all operations are cancellable through the standard GnomeVFS cancellation
97
112
mechanism and you can specify a maximum amount of time an operation may take
98
 
through <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-set-timeout"><span class="type">gnome_vfs_socket_set_timeout</span></a>.
 
113
through <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-set-timeout" title="gnome_vfs_socket_set_timeout ()"><span class="type">gnome_vfs_socket_set_timeout</span></a>.
99
114
 
100
115
</p>
101
116
</div>
102
117
<div class="refsect1" lang="en">
103
 
<a name="id2688190"></a><h2>Details</h2>
 
118
<a name="gnome-vfs-20-gnome-vfs-socket.details"></a><h2>Details</h2>
104
119
<div class="refsect2" lang="en">
105
 
<a name="id2688200"></a><h3>
106
 
<a name="GnomeVFSSocket"></a>GnomeVFSSocket</h3>
107
 
<a class="indexterm" name="id2688213"></a><pre class="programlisting">typedef struct GnomeVFSSocket GnomeVFSSocket;
 
120
<a name="GnomeVFSSocket"></a><h3>GnomeVFSSocket</h3>
 
121
<pre class="programlisting">typedef struct GnomeVFSSocket GnomeVFSSocket;
108
122
</pre>
109
123
<p>
110
124
An handle to a generic unbuffered socket connection established with
111
 
<a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-new"><code class="function">gnome_vfs_socket_new()</code></a>.
 
125
<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-new" title="gnome_vfs_socket_new ()"><code class="function">gnome_vfs_socket_new()</code></a>.
112
126
</p>
113
127
<p>
114
128
The specifics of the underlying socket implementation are hidden
115
 
inside the <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a> passed on construction.
 
129
inside the <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a> passed on construction.
116
130
</p>
117
131
<p>
118
132
If you need buffered I/O, you will also have to create a
119
 
<a href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer"><span class="type">GnomeVFSSocketBuffer</span></a>.</p>
 
133
<a class="link" href="gnome-vfs-20-gnome-vfs-socket-buffer.html#GnomeVFSSocketBuffer" title="GnomeVFSSocketBuffer"><span class="type">GnomeVFSSocketBuffer</span></a>.</p>
120
134
<p>
121
135
 
122
136
</p>
123
137
</div>
124
138
<hr>
125
139
<div class="refsect2" lang="en">
126
 
<a name="id2688272"></a><h3>
127
 
<a name="GnomeVFSSocketImpl"></a>GnomeVFSSocketImpl</h3>
128
 
<a class="indexterm" name="id2688285"></a><pre class="programlisting">typedef struct {
 
140
<a name="GnomeVFSSocketImpl"></a><h3>GnomeVFSSocketImpl</h3>
 
141
<pre class="programlisting">typedef struct {
129
142
  GnomeVFSSocketReadFunc read;
130
143
  GnomeVFSSocketWriteFunc write;
131
144
  GnomeVFSSocketCloseFunc close;
133
146
} GnomeVFSSocketImpl;
134
147
</pre>
135
148
<p>
136
 
An implementation of a generic socket (i.e. of <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a>)
 
149
An implementation of a generic socket (i.e. of <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a>)
137
150
encapsulating the details of how socket I/O works.
138
151
</p>
139
152
<p>
140
 
Please refer to <a href="gnome-vfs-20-gnome-vfs-ssl.html#GnomeVFSSSL"><span class="type">GnomeVFSSSL</span></a> for a sample implementation of this interface.</p>
 
153
Please refer to <a class="link" href="gnome-vfs-20-gnome-vfs-ssl.html#GnomeVFSSSL" title="GnomeVFSSSL"><span class="type">GnomeVFSSSL</span></a> for a sample implementation of this interface.</p>
141
154
<p>
142
155
 
143
156
</p>
145
158
<col align="left" valign="top">
146
159
<tbody>
147
160
<tr>
148
 
<td><span class="term"><a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketReadFunc">GnomeVFSSocketReadFunc</a>&#160;<em class="structfield"><code>read</code></em>;</span></td>
149
 
<td> A <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketReadFunc"><span class="type">GnomeVFSSocketReadFunc</span></a> function used for reading from a socket.
150
 
</td>
151
 
</tr>
152
 
<tr>
153
 
<td><span class="term"><a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketWriteFunc">GnomeVFSSocketWriteFunc</a>&#160;<em class="structfield"><code>write</code></em>;</span></td>
154
 
<td> A <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketWriteFunc"><span class="type">GnomeVFSSocketWriteFunc</span></a> function used for writing to a socket.
155
 
</td>
156
 
</tr>
157
 
<tr>
158
 
<td><span class="term"><a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketCloseFunc">GnomeVFSSocketCloseFunc</a>&#160;<em class="structfield"><code>close</code></em>;</span></td>
159
 
<td> A <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketCloseFunc"><span class="type">GnomeVFSSocketCloseFunc</span></a> function used for closing an open socket.
160
 
</td>
161
 
</tr>
162
 
<tr>
163
 
<td><span class="term"><a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketSetTimeoutFunc">GnomeVFSSocketSetTimeoutFunc</a>&#160;<em class="structfield"><code>set_timeout</code></em>;</span></td>
164
 
<td> A <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketSetTimeoutFunc"><span class="type">GnomeVFSSocketSetTimeoutFunc</span></a> function used for setting a socket's timeout.
 
161
<td><p><span class="term"><a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketReadFunc" title="GnomeVFSSocketReadFunc ()">GnomeVFSSocketReadFunc</a> <em class="structfield"><code>read</code></em>;</span></p></td>
 
162
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketReadFunc" title="GnomeVFSSocketReadFunc ()"><span class="type">GnomeVFSSocketReadFunc</span></a> function used for reading from a socket.
 
163
</td>
 
164
</tr>
 
165
<tr>
 
166
<td><p><span class="term"><a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketWriteFunc" title="GnomeVFSSocketWriteFunc ()">GnomeVFSSocketWriteFunc</a> <em class="structfield"><code>write</code></em>;</span></p></td>
 
167
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketWriteFunc" title="GnomeVFSSocketWriteFunc ()"><span class="type">GnomeVFSSocketWriteFunc</span></a> function used for writing to a socket.
 
168
</td>
 
169
</tr>
 
170
<tr>
 
171
<td><p><span class="term"><a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketCloseFunc" title="GnomeVFSSocketCloseFunc ()">GnomeVFSSocketCloseFunc</a> <em class="structfield"><code>close</code></em>;</span></p></td>
 
172
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketCloseFunc" title="GnomeVFSSocketCloseFunc ()"><span class="type">GnomeVFSSocketCloseFunc</span></a> function used for closing an open socket.
 
173
</td>
 
174
</tr>
 
175
<tr>
 
176
<td><p><span class="term"><a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketSetTimeoutFunc" title="GnomeVFSSocketSetTimeoutFunc ()">GnomeVFSSocketSetTimeoutFunc</a> <em class="structfield"><code>set_timeout</code></em>;</span></p></td>
 
177
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketSetTimeoutFunc" title="GnomeVFSSocketSetTimeoutFunc ()"><span class="type">GnomeVFSSocketSetTimeoutFunc</span></a> function used for setting a socket's timeout.
165
178
</td>
166
179
</tr>
167
180
</tbody>
169
182
</div>
170
183
<hr>
171
184
<div class="refsect2" lang="en">
172
 
<a name="id2688454"></a><h3>
173
 
<a name="GnomeVFSSocketReadFunc"></a>GnomeVFSSocketReadFunc ()</h3>
174
 
<a class="indexterm" name="id2688467"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      (*GnomeVFSSocketReadFunc)           (gpointer connection,
175
 
                                                         gpointer buffer,
176
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
177
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read_out,
178
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
185
<a name="GnomeVFSSocketReadFunc"></a><h3>GnomeVFSSocketReadFunc ()</h3>
 
186
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      (*GnomeVFSSocketReadFunc)           (<a
 
187
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
188
>gpointer</a> connection,
 
189
                                                         <a
 
190
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
191
>gpointer</a> buffer,
 
192
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
 
193
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read_out,
 
194
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
179
195
<p>
180
196
This is a generic prototype for a function that reads from a socket.
181
197
</p>
182
198
<p>
183
 
This function is implemented by a <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how data
184
 
should be written to a buffer using the <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-read"><code class="function">gnome_vfs_socket_read()</code></a>
 
199
This function is implemented by a <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how data
 
200
should be written to a buffer using the <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-read" title="gnome_vfs_socket_read ()"><code class="function">gnome_vfs_socket_read()</code></a>
185
201
function which hides the socket implementation details.</p>
186
202
<p>
187
203
 
190
206
<col align="left" valign="top">
191
207
<tbody>
192
208
<tr>
193
 
<td><span class="term"><em class="parameter"><code>connection</code></em>&#160;:</span></td>
 
209
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
194
210
<td> The socket connection.
195
211
</td>
196
212
</tr>
197
213
<tr>
198
 
<td><span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
 
214
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
199
215
<td> A connection buffer.
200
216
</td>
201
217
</tr>
202
218
<tr>
203
 
<td><span class="term"><em class="parameter"><code>bytes</code></em>&#160;:</span></td>
 
219
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
204
220
<td> The bytes to read.
205
221
</td>
206
222
</tr>
207
223
<tr>
208
 
<td><span class="term"><em class="parameter"><code>bytes_read_out</code></em>&#160;:</span></td>
 
224
<td><p><span class="term"><em class="parameter"><code>bytes_read_out</code></em> :</span></p></td>
209
225
<td> The bytes that were read (out).
210
226
</td>
211
227
</tr>
212
228
<tr>
213
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
229
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
214
230
<td> A cancellation handle that allows clients to cancel the read operation.
215
231
</td>
216
232
</tr>
217
233
<tr>
218
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
219
 
<td> A <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> signalling the result of the read operation.
 
234
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
235
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> signalling the result of the read operation.
220
236
</td>
221
237
</tr>
222
238
</tbody>
224
240
</div>
225
241
<hr>
226
242
<div class="refsect2" lang="en">
227
 
<a name="id2688654"></a><h3>
228
 
<a name="GnomeVFSSocketWriteFunc"></a>GnomeVFSSocketWriteFunc ()</h3>
229
 
<a class="indexterm" name="id2688667"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      (*GnomeVFSSocketWriteFunc)          (gpointer connection,
230
 
                                                         gconstpointer buffer,
231
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
232
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written_out,
233
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
243
<a name="GnomeVFSSocketWriteFunc"></a><h3>GnomeVFSSocketWriteFunc ()</h3>
 
244
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      (*GnomeVFSSocketWriteFunc)          (<a
 
245
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
246
>gpointer</a> connection,
 
247
                                                         <a
 
248
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
249
>gconstpointer</a> buffer,
 
250
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
 
251
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written_out,
 
252
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
234
253
<p>
235
254
This is a generic prototype for a function that writes to a socket.
236
255
</p>
237
256
<p>
238
 
This function is implemented by a <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how data
239
 
should be written to a buffer using the <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-write"><code class="function">gnome_vfs_socket_write()</code></a>
 
257
This function is implemented by a <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how data
 
258
should be written to a buffer using the <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-write" title="gnome_vfs_socket_write ()"><code class="function">gnome_vfs_socket_write()</code></a>
240
259
function which hides the socket implementation details.</p>
241
260
<p>
242
261
 
245
264
<col align="left" valign="top">
246
265
<tbody>
247
266
<tr>
248
 
<td><span class="term"><em class="parameter"><code>connection</code></em>&#160;:</span></td>
 
267
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
249
268
<td> The socket connection.
250
269
</td>
251
270
</tr>
252
271
<tr>
253
 
<td><span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
 
272
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
254
273
<td> A connection buffer.
255
274
</td>
256
275
</tr>
257
276
<tr>
258
 
<td><span class="term"><em class="parameter"><code>bytes</code></em>&#160;:</span></td>
 
277
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
259
278
<td> The bytes to write.
260
279
</td>
261
280
</tr>
262
281
<tr>
263
 
<td><span class="term"><em class="parameter"><code>bytes_written_out</code></em>&#160;:</span></td>
 
282
<td><p><span class="term"><em class="parameter"><code>bytes_written_out</code></em> :</span></p></td>
264
283
<td> The bytes that were written.
265
284
</td>
266
285
</tr>
267
286
<tr>
268
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
287
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
269
288
<td> A cancellation handle that allows clients to cancel the write operation.
270
289
</td>
271
290
</tr>
272
291
<tr>
273
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
274
 
<td> A <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> signalling the result of the write operation.
 
292
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
293
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> signalling the result of the write operation.
275
294
</td>
276
295
</tr>
277
296
</tbody>
279
298
</div>
280
299
<hr>
281
300
<div class="refsect2" lang="en">
282
 
<a name="id2688854"></a><h3>
283
 
<a name="GnomeVFSSocketCloseFunc"></a>GnomeVFSSocketCloseFunc ()</h3>
284
 
<a class="indexterm" name="id2688867"></a><pre class="programlisting">void                (*GnomeVFSSocketCloseFunc)          (gpointer connection,
285
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
301
<a name="GnomeVFSSocketCloseFunc"></a><h3>GnomeVFSSocketCloseFunc ()</h3>
 
302
<pre class="programlisting">void                (*GnomeVFSSocketCloseFunc)          (<a
 
303
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
304
>gpointer</a> connection,
 
305
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
286
306
<p>
287
307
This is a generic prototype for a function that closes a socket.
288
308
</p>
289
309
<p>
290
 
This function is implemented by a <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how an
291
 
open socket that was previously opened by <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-new"><code class="function">gnome_vfs_socket_new()</code></a>
292
 
should be closed using the <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-set-timeout"><code class="function">gnome_vfs_socket_set_timeout()</code></a> function which
 
310
This function is implemented by a <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how an
 
311
open socket that was previously opened by <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-new" title="gnome_vfs_socket_new ()"><code class="function">gnome_vfs_socket_new()</code></a>
 
312
should be closed using the <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-set-timeout" title="gnome_vfs_socket_set_timeout ()"><code class="function">gnome_vfs_socket_set_timeout()</code></a> function which
293
313
hides the socket implementation details.</p>
294
314
<p>
295
315
 
298
318
<col align="left" valign="top">
299
319
<tbody>
300
320
<tr>
301
 
<td><span class="term"><em class="parameter"><code>connection</code></em>&#160;:</span></td>
 
321
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
302
322
<td>
303
323
</td>
304
324
</tr>
305
325
<tr>
306
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
326
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
307
327
<td> A cancellation handle that allows clients to cancel the write operation.
308
328
</td>
309
329
</tr>
312
332
</div>
313
333
<hr>
314
334
<div class="refsect2" lang="en">
315
 
<a name="id2688978"></a><h3>
316
 
<a name="GnomeVFSSocketSetTimeoutFunc"></a>GnomeVFSSocketSetTimeoutFunc ()</h3>
317
 
<a class="indexterm" name="id2688992"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      (*GnomeVFSSocketSetTimeoutFunc)     (gpointer connection,
318
 
                                                         GTimeVal *timeout,
319
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
335
<a name="GnomeVFSSocketSetTimeoutFunc"></a><h3>GnomeVFSSocketSetTimeoutFunc ()</h3>
 
336
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      (*GnomeVFSSocketSetTimeoutFunc)     (<a
 
337
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
338
>gpointer</a> connection,
 
339
                                                         <a
 
340
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
 
341
>GTimeVal</a> *timeout,
 
342
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
320
343
<p>
321
344
This is a generic prototype for a function that sets a socket timeout.
322
345
</p>
323
346
<p>
324
 
This function is implemented by a <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how
 
347
This function is implemented by a <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a>, and it defines how
325
348
a socket timeout should be set using 
326
 
should be closed by the <a href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-close"><code class="function">gnome_vfs_socket_close()</code></a> function which
 
349
should be closed by the <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#gnome-vfs-socket-close" title="gnome_vfs_socket_close ()"><code class="function">gnome_vfs_socket_close()</code></a> function which
327
350
hides the socket implementation details.</p>
328
351
<p>
329
352
 
332
355
<col align="left" valign="top">
333
356
<tbody>
334
357
<tr>
335
 
<td><span class="term"><em class="parameter"><code>connection</code></em>&#160;:</span></td>
336
 
<td>
337
 
</td>
338
 
</tr>
339
 
<tr>
340
 
<td><span class="term"><em class="parameter"><code>timeout</code></em>&#160;:</span></td>
341
 
<td>
342
 
</td>
343
 
</tr>
344
 
<tr>
345
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
358
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
 
359
<td>
 
360
</td>
 
361
</tr>
 
362
<tr>
 
363
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
 
364
<td>
 
365
</td>
 
366
</tr>
 
367
<tr>
 
368
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
346
369
<td> A cancellation handle that allows clients to cancel the write operation.
347
370
</td>
348
371
</tr>
349
372
<tr>
350
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
351
 
<td> A <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> signalling the result of the write operation.
 
373
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
374
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> signalling the result of the write operation.
352
375
</td>
353
376
</tr>
354
377
</tbody>
356
379
</div>
357
380
<hr>
358
381
<div class="refsect2" lang="en">
359
 
<a name="id2689132"></a><h3>
360
 
<a name="gnome-vfs-socket-new"></a>gnome_vfs_socket_new ()</h3>
361
 
<a class="indexterm" name="id2689146"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a>*     gnome_vfs_socket_new                (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl">GnomeVFSSocketImpl</a> *impl,
 
382
<a name="gnome-vfs-socket-new"></a><h3>gnome_vfs_socket_new ()</h3>
 
383
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a>*     gnome_vfs_socket_new                (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl">GnomeVFSSocketImpl</a> *impl,
362
384
                                                         void *connection);</pre>
363
385
<p>
364
 
Creates a new <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a> using the specific implementation
 
386
Creates a new <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a> using the specific implementation
365
387
<em class="parameter"><code>impl</code></em>.</p>
366
388
<p>
367
389
 
370
392
<col align="left" valign="top">
371
393
<tbody>
372
394
<tr>
373
 
<td><span class="term"><em class="parameter"><code>impl</code></em>&#160;:</span></td>
374
 
<td> an implementation of socket, e.g. <a href="gnome-vfs-20-gnome-vfs-ssl.html#GnomeVFSSSL"><span class="type">GnomeVFSSSL</span></a>.
 
395
<td><p><span class="term"><em class="parameter"><code>impl</code></em> :</span></p></td>
 
396
<td> an implementation of socket, e.g. <a class="link" href="gnome-vfs-20-gnome-vfs-ssl.html#GnomeVFSSSL" title="GnomeVFSSSL"><span class="type">GnomeVFSSSL</span></a>.
375
397
</td>
376
398
</tr>
377
399
<tr>
378
 
<td><span class="term"><em class="parameter"><code>connection</code></em>&#160;:</span></td>
 
400
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
379
401
<td> pointer to a connection object used by <em class="parameter"><code>impl</code></em> to track.
380
402
state (the exact nature of <em class="parameter"><code>connection</code></em> varies from implementation to
381
403
implementation).
382
404
</td>
383
405
</tr>
384
406
<tr>
385
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
407
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
386
408
<td> a newly created socket.
387
409
</td>
388
410
</tr>
391
413
</div>
392
414
<hr>
393
415
<div class="refsect2" lang="en">
394
 
<a name="id2689265"></a><h3>
395
 
<a name="gnome-vfs-socket-write"></a>gnome_vfs_socket_write ()</h3>
396
 
<a class="indexterm" name="id2689278"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_write              (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
397
 
                                                         gconstpointer buffer,
 
416
<a name="gnome-vfs-socket-write"></a><h3>gnome_vfs_socket_write ()</h3>
 
417
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_write              (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
418
                                                         <a
 
419
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
420
>gconstpointer</a> buffer,
398
421
                                                         int bytes,
399
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written,
400
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
422
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_written,
 
423
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
401
424
<p>
402
425
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</code></em>.</p>
403
426
<p>
407
430
<col align="left" valign="top">
408
431
<tbody>
409
432
<tr>
410
 
<td><span class="term"><em class="parameter"><code>socket</code></em>&#160;:</span></td>
 
433
<td><p><span class="term"><em class="parameter"><code>socket</code></em> :</span></p></td>
411
434
<td> socket to write data to.
412
435
</td>
413
436
</tr>
414
437
<tr>
415
 
<td><span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
 
438
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
416
439
<td> data to write to the socket.
417
440
</td>
418
441
</tr>
419
442
<tr>
420
 
<td><span class="term"><em class="parameter"><code>bytes</code></em>&#160;:</span></td>
 
443
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
421
444
<td> number of bytes from <em class="parameter"><code>buffer</code></em> to write to <em class="parameter"><code>socket</code></em>.
422
445
</td>
423
446
</tr>
424
447
<tr>
425
 
<td><span class="term"><em class="parameter"><code>bytes_written</code></em>&#160;:</span></td>
426
 
<td> pointer to a <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a>, will contain
 
448
<td><p><span class="term"><em class="parameter"><code>bytes_written</code></em> :</span></p></td>
 
449
<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
427
450
the number of bytes actually written to the <em class="parameter"><code>socket</code></em> on return.
428
451
</td>
429
452
</tr>
430
453
<tr>
431
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
454
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
432
455
<td> optional cancellation object.
433
456
</td>
434
457
</tr>
435
458
<tr>
436
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
437
 
<td> <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
 
459
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
460
<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.
438
461
</td>
439
462
</tr>
440
463
</tbody>
442
465
</div>
443
466
<hr>
444
467
<div class="refsect2" lang="en">
445
 
<a name="id2689482"></a><h3>
446
 
<a name="gnome-vfs-socket-close"></a>gnome_vfs_socket_close ()</h3>
447
 
<a class="indexterm" name="id2689496"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_close              (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
448
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
468
<a name="gnome-vfs-socket-close"></a><h3>gnome_vfs_socket_close ()</h3>
 
469
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_close              (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
470
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
449
471
<p>
450
472
Close <em class="parameter"><code>socket</code></em>, freeing any resources it may be using.</p>
451
473
<p>
455
477
<col align="left" valign="top">
456
478
<tbody>
457
479
<tr>
458
 
<td><span class="term"><em class="parameter"><code>socket</code></em>&#160;:</span></td>
 
480
<td><p><span class="term"><em class="parameter"><code>socket</code></em> :</span></p></td>
459
481
<td> the socket to be closed.
460
482
</td>
461
483
</tr>
462
484
<tr>
463
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
485
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
464
486
<td> optional cancellation object.
465
487
</td>
466
488
</tr>
467
489
<tr>
468
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
469
 
<td> <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
 
490
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
491
<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.
470
492
</td>
471
493
</tr>
472
494
</tbody>
474
496
</div>
475
497
<hr>
476
498
<div class="refsect2" lang="en">
477
 
<a name="id2689595"></a><h3>
478
 
<a name="gnome-vfs-socket-read"></a>gnome_vfs_socket_read ()</h3>
479
 
<a class="indexterm" name="id2689608"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_read               (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
480
 
                                                         gpointer buffer,
481
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
482
 
                                                         <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
483
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
499
<a name="gnome-vfs-socket-read"></a><h3>gnome_vfs_socket_read ()</h3>
 
500
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_read               (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
501
                                                         <a
 
502
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
 
503
>gpointer</a> buffer,
 
504
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> bytes,
 
505
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *bytes_read,
 
506
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
484
507
<p>
485
508
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>buffer</code></em>.</p>
486
509
<p>
490
513
<col align="left" valign="top">
491
514
<tbody>
492
515
<tr>
493
 
<td><span class="term"><em class="parameter"><code>socket</code></em>&#160;:</span></td>
 
516
<td><p><span class="term"><em class="parameter"><code>socket</code></em> :</span></p></td>
494
517
<td> socket to read data from.
495
518
</td>
496
519
</tr>
497
520
<tr>
498
 
<td><span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
 
521
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
499
522
<td> allocated buffer of at least <em class="parameter"><code>bytes</code></em> bytes to be read into.
500
523
</td>
501
524
</tr>
502
525
<tr>
503
 
<td><span class="term"><em class="parameter"><code>bytes</code></em>&#160;:</span></td>
 
526
<td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
504
527
<td> number of bytes to read from <em class="parameter"><code>socket</code></em> into <em class="parameter"><code>buffer</code></em>.
505
528
</td>
506
529
</tr>
507
530
<tr>
508
 
<td><span class="term"><em class="parameter"><code>bytes_read</code></em>&#160;:</span></td>
509
 
<td> pointer to a <a href="gnome-vfs-20-gnome-vfs-file-size.html#GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a>, will contain
 
531
<td><p><span class="term"><em class="parameter"><code>bytes_read</code></em> :</span></p></td>
 
532
<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
510
533
the number of bytes actually read from the socket on return.
511
534
</td>
512
535
</tr>
513
536
<tr>
514
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
537
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
515
538
<td> optional cancellation object.
516
539
</td>
517
540
</tr>
518
541
<tr>
519
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
520
 
<td> <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
 
542
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
543
<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.
521
544
</td>
522
545
</tr>
523
546
</tbody>
525
548
</div>
526
549
<hr>
527
550
<div class="refsect2" lang="en">
528
 
<a name="id2689814"></a><h3>
529
 
<a name="gnome-vfs-socket-free"></a>gnome_vfs_socket_free ()</h3>
530
 
<a class="indexterm" name="id2689829"></a><pre class="programlisting">void                gnome_vfs_socket_free               (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket);</pre>
 
551
<a name="gnome-vfs-socket-free"></a><h3>gnome_vfs_socket_free ()</h3>
 
552
<pre class="programlisting">void                gnome_vfs_socket_free               (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket);</pre>
531
553
<p>
532
554
Frees the memory allocated for <em class="parameter"><code>socket</code></em>, but does
533
 
not call any <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a> function.</p>
 
555
not call any <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocketImpl" title="GnomeVFSSocketImpl"><span class="type">GnomeVFSSocketImpl</span></a> function.</p>
534
556
<p>
535
557
 
536
558
</p>
537
559
<div class="variablelist"><table border="0">
538
560
<col align="left" valign="top">
539
561
<tbody><tr>
540
 
<td><span class="term"><em class="parameter"><code>socket</code></em>&#160;:</span></td>
541
 
<td> The <a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a> you want to free. 
 
562
<td><p><span class="term"><em class="parameter"><code>socket</code></em> :</span></p></td>
 
563
<td> The <a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket"><span class="type">GnomeVFSSocket</span></a> you want to free. 
542
564
</td>
543
565
</tr></tbody>
544
566
</table></div>
547
569
</div>
548
570
<hr>
549
571
<div class="refsect2" lang="en">
550
 
<a name="id2689910"></a><h3>
551
 
<a name="gnome-vfs-socket-set-timeout"></a>gnome_vfs_socket_set_timeout ()</h3>
552
 
<a class="indexterm" name="id2689926"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_set_timeout        (<a href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket">GnomeVFSSocket</a> *socket,
553
 
                                                         GTimeVal *timeout,
554
 
                                                         <a href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
 
572
<a name="gnome-vfs-socket-set-timeout"></a><h3>gnome_vfs_socket_set_timeout ()</h3>
 
573
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_socket_set_timeout        (<a class="link" href="gnome-vfs-20-gnome-vfs-socket.html#GnomeVFSSocket" title="GnomeVFSSocket">GnomeVFSSocket</a> *socket,
 
574
                                                         <a
 
575
href="/usr/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html#GTimeVal"
 
576
>GTimeVal</a> *timeout,
 
577
                                                         <a class="link" href="gnome-vfs-20-gnome-vfs-async-ops.html#GnomeVFSCancellation" title="GnomeVFSCancellation">GnomeVFSCancellation</a> *cancellation);</pre>
555
578
<p>
556
 
Set a timeout of <em class="parameter"><code>timeout</code></em>. If <em class="parameter"><code>timeout</code></em> is <code class="literal">NULL</code>, following operations
 
579
Set a timeout of <em class="parameter"><code>timeout</code></em>. If <em class="parameter"><code>timeout</code></em> is <a
 
580
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
 
581
><code class="literal">NULL</code></a>, following operations
557
582
will block indefinitely).
558
583
</p>
559
584
<p>
567
592
<col align="left" valign="top">
568
593
<tbody>
569
594
<tr>
570
 
<td><span class="term"><em class="parameter"><code>socket</code></em>&#160;:</span></td>
 
595
<td><p><span class="term"><em class="parameter"><code>socket</code></em> :</span></p></td>
571
596
<td> socket to set the timeout of.
572
597
</td>
573
598
</tr>
574
599
<tr>
575
 
<td><span class="term"><em class="parameter"><code>timeout</code></em>&#160;:</span></td>
 
600
<td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td>
576
601
<td> the timeout.
577
602
</td>
578
603
</tr>
579
604
<tr>
580
 
<td><span class="term"><em class="parameter"><code>cancellation</code></em>&#160;:</span></td>
 
605
<td><p><span class="term"><em class="parameter"><code>cancellation</code></em> :</span></p></td>
581
606
<td> optional cancellation object.
582
607
</td>
583
608
</tr>
584
609
<tr>
585
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
586
 
<td> <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult"><span class="type">GnomeVFSResult</span></a> indicating the success of the operation.
 
610
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
611
<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.
587
612
 
588
613
</td>
589
614
</tr>
594
619
</div>
595
620
</div>
596
621
</div>
 
622
<div class="footer">
 
623
<hr>
 
624
          Generated by GTK-Doc V1.10</div>
597
625
</body>
598
626
</html>