]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/tcpclint.tex
add wxSYS_DCLICK_TIME system metric constant; use it for the generic list control...
[wxWidgets.git] / docs / latex / wx / tcpclint.tex
CommitLineData
e2a6f233
JS
1\section{\class{wxTCPClient}}\label{wxtcpclient}
2
3A wxTCPClient object represents the client part of a client-server conversation.
4It emulates a DDE-style protocol, but uses TCP/IP which is available on most platforms.
5
6A DDE-based implementation for Windows is available using \helpref{wxDDEClient}{wxddeclient}.
7
8To create a client which can communicate with a suitable server,
9you need to derive a class from wxTCPConnection and another from wxTCPClient.
10The custom wxTCPConnection class will intercept communications in
11a `conversation' with a server, and the custom wxTCPServer is required
f6bcfd97 12so that a user-overridden \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} member can return
e2a6f233
JS
13a wxTCPConnection of the required class, when a connection is made.
14
15\wxheading{Derived from}
16
17wxClientBase\\
18\helpref{wxObject}{wxobject}
19
954b8ae6
JS
20\wxheading{Include files}
21
22<wx/sckipc.h>
23
a7af285d
VZ
24\wxheading{Library}
25
26\helpref{wxNet}{librarieslist}
27
e2a6f233
JS
28\wxheading{See also}
29
30\helpref{wxTCPServer}{wxtcpserver}, \helpref{wxTCPConnection}{wxtcpconnection},
31\helpref{Interprocess communications overview}{ipcoverview}
32
33\latexignore{\rtfignore{\wxheading{Members}}}
34
f510b7b2 35\membersection{wxTCPClient::wxTCPClient}\label{wxtcpclientctor}
e2a6f233
JS
36
37\func{}{wxTCPClient}{\void}
38
39Constructs a client object.
40
41\membersection{wxTCPClient::MakeConnection}\label{wxtcpclientmakeconnection}
42
43\func{wxConnectionBase *}{MakeConnection}{\param{const wxString\& }{host}, \param{const wxString\& }{service}, \param{const wxString\& }{topic}}
44
45Tries to make a connection with a server specified by the host
46(a machine name under Unix), service name (must
47contain an integer port number under Unix), and a topic string. If the
48server allows a connection, a wxTCPConnection object will be returned.
49The type of wxTCPConnection returned can be altered by overriding
50the \helpref{wxTCPClient::OnMakeConnection}{wxtcpclientonmakeconnection} member to return your own
51derived connection object.
52
53\membersection{wxTCPClient::OnMakeConnection}\label{wxtcpclientonmakeconnection}
54
55\func{wxConnectionBase *}{OnMakeConnection}{\void}
56
57The type of \helpref{wxTCPConnection}{wxtcpconnection} returned from a \helpref{wxTCPClient::MakeConnection}{wxtcpclientmakeconnection} call can
58be altered by deriving the {\bf OnMakeConnection} member to return your
59own derived connection object. By default, a wxTCPConnection
60object is returned.
61
62The advantage of deriving your own connection class is that it will
63enable you to intercept messages initiated by the server, such
64as \helpref{wxTCPConnection::OnAdvise}{wxtcpconnectiononadvise}. You may also want to
65store application-specific data in instances of the new class.
66
f510b7b2 67\membersection{wxTCPClient::ValidHost}\label{wxtcpclientvalidhost}
e2a6f233
JS
68
69\func{bool}{ValidHost}{\param{const wxString\& }{host}}
70
cc81d32f 71Returns true if this is a valid host name, false otherwise.
e2a6f233 72