wxWidgets/samples/ipc
Julian Smart f010ad4812 Applied patch [ 600051 ] DDE and TCP improvements and fixes
By Michael Fielding

As discussed on wx-dev. some fixes and improvements for Interprocess Communication (IPC), using DDE and TCP.

1. DDE buffers were using a global buffer
2. TCP buffers were allocated each time needed, and Request would have caused memory leaks had it been used.

Fixed these both by using a self-resizing buffer in wxConnectionBase. Changed samples and docs to reflect the improved (but backward compatible) internal buffer management. wxConnectionBase could (in future) use wxMemoryBuffer.

3. IPC sample had trouble closing, causing crash, when closing server using window X button.

Because it was (effectively) trying to delete a window in OnExit, when that window was already destroyed. Fixed by making IPCDialog and MyConnection remember if they'd destroyed each other. It's not elegant, but either the connection or the window could be deleted first.

4. Docs for wxDDE... and wxTCP... duplicated eachother, supposed to have same API. Some parts unclear.

Patch removes dde and tcp-specific files (including from tipc.tex and classes.tex), and explains how ipc.h selects for you which one to use based on platform. Some other misc clarifications.

6. Client sample was suffering apparent memory leak because of not deleting connection object, and had a hack in there to do that.

In fact this was due to the derived OnDisconnect not deleting itself, as it does in base class. Mentioned need to do it in docs, fixed sample so that it does.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-01 14:48:16 +00:00
..
.cvsignore store CodeWarrior 5.3 projects as xml instead of binary projects 2001-12-02 18:11:49 +00:00
client.b32
client.cpp Applied patch [ 600051 ] DDE and TCP improvements and fixes 2002-09-01 14:48:16 +00:00
client.def
client.dsp Updated VC++ files 2002-01-18 14:33:01 +00:00
client.g95
client.h Applied patch [ 600051 ] DDE and TCP improvements and fixes 2002-09-01 14:48:16 +00:00
client.pro 1. new samples proejct files for VC++ 2001-10-10 00:34:22 +00:00
client.rc
client.vc
client.wat
ddesetup.h added wx/ipc.h and used/documented it 2002-04-15 18:24:46 +00:00
makefile.b32 Applied #487077: updates/fixes for BCC32 2001-12-01 14:52:00 +00:00
makefile.dos
makefile.g95
Makefile.in inserted @IF_GNU_MAKE@ to allow building with other make versions 2002-01-25 11:31:21 +00:00
makefile.unx replaced "CC = gcc" and even stranger "CPP = gcc -g" (huh?) with 2001-11-28 18:10:15 +00:00
makefile.vc
mondrian.ico
mondrian.xpm
server.b32
server.cpp Applied patch [ 600051 ] DDE and TCP improvements and fixes 2002-09-01 14:48:16 +00:00
server.def
server.dsp Updated VC++ files 2002-01-18 14:33:01 +00:00
server.g95
server.h Applied patch [ 600051 ] DDE and TCP improvements and fixes 2002-09-01 14:48:16 +00:00
server.pro 1. new samples proejct files for VC++ 2001-10-10 00:34:22 +00:00
server.rc
server.vc
server.wat