|Dart Home | PowerTCP Emulation for ActiveX | Custom Development||Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums|
|Author||Forum: PowerTCP Emulation / Telnet for ActiveX|
Topic: Colsing Telnet during receiving data
From: Ettlingen, Germany
Member Since: 06/22/06
|posted August 1, 2007 4:31 AM
I programmed a Telnet client with terminal window in MFC. Depending on the command I send to the telnet server I will receive lots of data from the server. My Telnet class instance is created dynamically (operator new) when the user opens the terminal window and will be destroyed (operator delete) when the user closes the terminal window. My problem is, when the user closes the terminal window during receiving data, the programm crashes.
When the user closes the terminal window I do the following:
1. Closing the Telnet connection with the Close-method
2. Checking the Result of the Close-method if its 0
3. Checking the State if its DartTelnet::tcpClosed
After all this, I delete the instance of my Telnet class.
I have a Trace-Output in the Telnet-Receive-Event, which shows the amount of bytes which are currently in the receive buffer and the connection state. The problem now is, after closing the connection and destroying the telnet instance during receiving data, the receive event is fired once again (number of bytes = 51, Telnet-State = DartTelnet::tcpConnected). This causes of cause a crash. How can i solve this problem?
Thanks in advance
|Jamie Powell (Admin)
From: Rome, NY USA
Member Since: 03/13/07
Extra Support Options
Custom Application Development
|posted August 1, 2007 1:05 PM
Juergen, this request needs to be handled through our administrative procedures prior to response. Please contact firstname.lastname@example.org directly about this issue.
|Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums|
|This site is powered by PowerTCP WebServer for ActiveX|