bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

change of socketport constructor


From: triendl klaus
Subject: change of socketport constructor
Date: Sat, 12 Apr 2003 15:21:46 +0200

hi,

i derived my own class from socketport and tested the whole 
server-implemenentation with socketservice(s) and attached socketports 
thoroughly on windows (2000 and xp) and discovered severe problems with the 
teamwork of socketservice and my socketport during construction.

the point is that the socketport constructor expects a valid socketservice to 
which it attaches itself after establishing the connection with the client. 
after attaching itself it causes the socketservice to update itself. then the 
construction of the derived class can continue. so far so good.
now, the problem is that the socketservice runs in its own thread which is so 
quick that if there is already pending data on the socket it calls 
SocketPort::pending() BEFORE the virtual function pointers of the derived class 
and other variables are initialized.


therefore i changed the code so far that the class derived from socketport has 
to attach itself now - after all variables have been initialized.
if you agree i would send a patch.


--
klaus triendl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]