Has anyone have any problems getting the tcpsession demo to work with 1.9.1+ libraries? (tcpservice.cpp in the demo directory)
I had it working with 1.6.2, but I've had no success with 1.9.x.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-01-03
correction:
the tcpSERVICE demo,
not tcpsession..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's ok, everybody makes mistakes. Probably a cut and paste error? :) Anyway, I too have noticed that the TCPService demo doesn't function anymore. I have old versions of CC++ (1.4.3 and 1.5.0) where the TCPService demo works. I can't get it to work at all under the 1.9.X versions. I tried this using both Redhat 7.1 and 7.2. Does anyone know what's going on?
Mark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is that ChatterThread::Run() is not being called. It is Supposed to be called when the semaphore is signalled. The semaphore IS being signalled but the thread is not started. Looks like some other bug in CCXX???
To get it working, change the call in the ChatterThread constructor (~line 340) from Thread( sem ) to Thread()... And change the call in CCExec::RunApp from sem->Post() to my_Chatter->Start().
One other modification which I found to be crucial to stop the thing hanging after a disconnection is as follows:
In ChatterSession::ChatterSession()
add the line setOutputDetect(true).
The SampleSocketPort demo I wrote works for me 99% straight out of the box. Personally I think it is easier to understand too.
The problem with it is that it does not seem to bind to 'localhost / 127.0.0.1'. It only binds to the real IP of the machine. Even though I create the InetHostAddress with INADDR_ANY! Is this another new bug, or am I missing something ?
Nick
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good debugging.
From 1.9.x (or early, I don't remember) all Thread constructor do not create any thread. System thread is created on Start. This for portability reason (Borland and MS compiler init virtual table after)
I fixed tcpservice using Start.
In next release I'll remove Thread copy contructor too, for the same reason
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has anyone have any problems getting the tcpsession demo to work with 1.9.1+ libraries? (tcpservice.cpp in the demo directory)
I had it working with 1.6.2, but I've had no success with 1.9.x.
Thanks
correction:
the tcpSERVICE demo,
not tcpsession..
That's ok, everybody makes mistakes. Probably a cut and paste error? :) Anyway, I too have noticed that the TCPService demo doesn't function anymore. I have old versions of CC++ (1.4.3 and 1.5.0) where the TCPService demo works. I can't get it to work at all under the 1.9.X versions. I tried this using both Redhat 7.1 and 7.2. Does anyone know what's going on?
Mark
The problem is that ChatterThread::Run() is not being called. It is Supposed to be called when the semaphore is signalled. The semaphore IS being signalled but the thread is not started. Looks like some other bug in CCXX???
To get it working, change the call in the ChatterThread constructor (~line 340) from Thread( sem ) to Thread()... And change the call in CCExec::RunApp from sem->Post() to my_Chatter->Start().
One other modification which I found to be crucial to stop the thing hanging after a disconnection is as follows:
In ChatterSession::ChatterSession()
add the line setOutputDetect(true).
The SampleSocketPort demo I wrote works for me 99% straight out of the box. Personally I think it is easier to understand too.
The problem with it is that it does not seem to bind to 'localhost / 127.0.0.1'. It only binds to the real IP of the machine. Even though I create the InetHostAddress with INADDR_ANY! Is this another new bug, or am I missing something ?
Nick
Good debugging.
From 1.9.x (or early, I don't remember) all Thread constructor do not create any thread. System thread is created on Start. This for portability reason (Borland and MS compiler init virtual table after)
I fixed tcpservice using Start.
In next release I'll remove Thread copy contructor too, for the same reason
Tested on Solaris and problem raise :(
Programmer is a hard work :)
select method now work correctly... but Solaris HAVE poll system call !!!