File: wx186.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (192 lines) | stat: -rw-r--r-- 4,634 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<HTML>
<head><title>wxProtocol</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxprotocol"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx185.htm#wxprocessevent"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx187.htm#wxquerycol"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxProtocol</H2>
<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx210.htm#wxsocketclient">wxSocketClient</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/protocol/protocol.h&gt;<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx209.htm#wxsocketbase">wxSocketBase</A>, <A HREF="wx254.htm#wxurl">wxURL</A><P>
<A HREF="#topic683">Members</A><BR>
<A HREF="#wxprotoreconnect">wxProtocol::Reconnect</A><BR>
<A HREF="#wxprotogetinput">wxProtocol::GetInputStream</A><BR>
<A HREF="#wxprotoabort">wxProtocol::Abort</A><BR>
<A HREF="#topic684">wxProtocol::GetError</A><BR>
<A HREF="#topic685">wxProtocol::GetContentType</A><BR>
<A HREF="#topic686">wxProtocol::SetUser</A><BR>
<A HREF="#topic687">wxProtocol::SetPassword</A><BR>
<P>

<HR>
<A NAME="topic683"></A>
<H3>Members</H3>
<P>

<HR>
<A NAME="wxprotoreconnect"></A>
<H3>wxProtocol::Reconnect</H3>
<P>
<B>bool</B> <B>Reconnect</B>()<P>
Tries to reestablish a previous opened connection (close and renegotiate connection).<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
TRUE, if the connection is established, else FALSE.<P>

<HR>
<A NAME="wxprotogetinput"></A>
<H3>wxProtocol::GetInputStream</H3>
<P>
<B>wxInputStream *</B> <B>GetInputStream</B>(<B>const wxString&amp;</B><I> path</I>)<P>
Creates a new input stream on the the specified path. You can use all but seek
functionnality of wxStream. Seek isn't available on all stream. For example,
http or ftp streams doesn't deal with it. Other functions like StreamSize and
Tell aren't available for the moment for this sort of stream.
You will be notified when the EOF is reached by an error.<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
Returns the initialized stream. You will have to delete it yourself once you
don't use it anymore. The destructor closes the network connection.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx120.htm#wxinputstream">wxInputStream</A><P>

<HR>
<A NAME="wxprotoabort"></A>
<H3>wxProtocol::Abort</H3>
<P>
<B>bool</B> <B>Abort</B>()<P>
Abort the current stream.<P>
<B><FONT COLOR="#FF0000">Warning</FONT></B><P>
It is advised to destroy the input stream instead of aborting the stream this way.<P>
<B><FONT COLOR="#FF0000">Return value</FONT></B><P>
Returns TRUE, if successful, else FALSE.<P>

<HR>
<A NAME="topic684"></A>
<H3>wxProtocol::GetError</H3>
<P>
<B>wxProtocolError</B> <B>GetError</B>()<P>
Returns the last occured error.<P>


<TABLE>


<TR><TD VALIGN=TOP>
<B>wxPROTO_NOERR</B>
</TD>

<TD VALIGN=TOP>
No error.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_NETERR</B>
</TD>

<TD VALIGN=TOP>
A generic network error occured.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_PROTERR</B>
</TD>

<TD VALIGN=TOP>
An error occured during negotiation.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_CONNERR</B>
</TD>

<TD VALIGN=TOP>
The client failed to connect the server.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_INVVAL</B>
</TD>

<TD VALIGN=TOP>
Invalid value.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_NOHNDLR</B>
</TD>

<TD VALIGN=TOP>
.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_NOFILE</B>
</TD>

<TD VALIGN=TOP>
The remote file doesn't exist.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_ABRT</B>
</TD>

<TD VALIGN=TOP>
Last action aborted.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_RCNCT</B>
</TD>

<TD VALIGN=TOP>
An error occured during reconnection.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>wxPROTO_STREAM</B>
</TD>

<TD VALIGN=TOP>
Someone tried to send a command during a transfer.
</TD></TR>


</TABLE>
<P>

<HR>
<A NAME="topic685"></A>
<H3>wxProtocol::GetContentType</H3>
<P>
<B>wxString</B> <B>GetContentType</B>()<P>
Returns the type of the content of the last opened stream. It is a mime-type.<P>

<HR>
<A NAME="topic686"></A>
<H3>wxProtocol::SetUser</H3>
<P>
<B>void </B> <B>SetUser</B>(<B>const wxString&amp;</B><I> user</I>)<P>
Sets the authentication user. It is mainly useful when FTP is used.<P>

<HR>
<A NAME="topic687"></A>
<H3>wxProtocol::SetPassword</H3>
<P>
<B>void</B> <B>SetPassword</B>(<B>const wxString&amp;</B><I> user</I>)<P>
Sets the authentication password. It is mainly useful when FTP is used.<P>

</BODY></HTML>