X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2a6f23364aefcd5095dc6558e3ab8144363fa96..a99acbb00a102458b8ad5ba4459712ba73d8b14d:/docs/latex/wx/tipc.tex diff --git a/docs/latex/wx/tipc.tex b/docs/latex/wx/tipc.tex index 5eb9e7d2ed..6ad9d56b77 100644 --- a/docs/latex/wx/tipc.tex +++ b/docs/latex/wx/tipc.tex @@ -20,6 +20,16 @@ for programming popular Internet protocols. Further information on these classes will be available in due course. +Notice that by including {\tt } you may define convnient synonyms for +the IPC classes: {\tt wxServer} for either {\tt wxDDEServer} or +{\tt wxTCPServer} depending on whether DDE-based or socket-based implementation +is used and the same thing for {\tt wxClient} and {\tt wxConnection}. By +default, DDE implementation is used under Windows. If you want to use IPC +between the different workstations you should define {\tt wxUSE\_DDE\_FOR\_IPC} +as $0$ before including this header -- this will force using TCP/IP +implementation even under Windows. + + wxWindows has a high-level protocol based on Windows DDE. There are two implementations of this DDE-like protocol: one using real DDE running on Windows only, and another using TCP/IP (sockets) that runs @@ -48,10 +58,16 @@ element of some messages. To create a connection (a conversation in Windows parlance), the client application sends the message MakeConnection to the client object, with a string service name to identify the server and a topic name to identify the topic for the -duration of the connection. Under Unix, the service name must contain an -integer port identifier. +duration of the connection. Under Unix, the service name may be either an +integer port identifier in which case an Internet domain socket will be used +for the communications or a valid file name (which shouldn't exist and will be +deleted afterwards) in which case a Unix domain socket is created. + +{\bf SECURITY NOTE:} Using Internet domain sockets if extremely insecure for +IPC as there is absolutely no access control for them, use Unix domain sockets +whenever possible! -The server then responds and either vetos the connection or allows it. +The server then responds and either vetoes the connection or allows it. If allowed, a connection object is created which persists until the connection is closed. The connection object is then used for subsequent messages between client and server. @@ -132,7 +148,7 @@ To create a client which can communicate with a suitable server, you need to derive a class from wxDDEConnection and another from wxDDEClient. The custom wxDDEConnection class will intercept communications in a `conversation' with a server, and the custom wxDDEServer is required -so that a user-overriden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return +so that a user-overridden \helpref{wxDDEClient::OnMakeConnection}{wxddeclientonmakeconnection} member can return a wxDDEConnection of the required class, when a connection is made. For example: