Login  
Search All Forums
Dart Home | PowerTCP Winsock for ActiveX | Custom Development Reply | PowerTCP Winsock for ActiveX Topics | Forums   
AuthorForum: PowerTCP Winsock for ActiveX
Topic: WinSock stops working in VB-IDE
achim_cux

From: cuxhaven, Germany
Posts: 2
Member Since: 11/19/07
posted January 21, 2008 5:10 PM

Who can help me?

I have writen a server-Application with the Winsock-Control. It works fine, when It is compiled as EXE. But when the program runs in VB-IDE, there is a big Problem:
After the Program is interupted by using the Pause-Button of the IDE or by displaying a Message-Box, the Receive-Event don't fires, when the Programm is running again. The Socket State is 2 and the ReceiceBufferCount Grows up, but nothing happens. I Must Close the socket then and connect again.
It is very helpfull for me, to run the Server in the VB-IDE for a short time, to get it stable soon. But this Problem makes it imposible. For Years i used the socketcontrol, wich is comming with VB. But over 200 users it It did strange things. But interupting the Programm as described above as never a problem.

Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted January 22, 2008 1:48 PM

Hello,

It seems that you are using PowerTCP Winsock for Active X in a non-blocking mode (asynchronous mode).
If this is the scenario, then I would suggest you to please code your application without Message boxes. The reason being that non-blocking use requires your application to execute with minimum User interface impact.
Using Message Boxes inside events will block the application till the time any action is performed on the message box. Instead of this, you may try using the Debug.Print statement.

I hope this is of help.

Best Regards,
Amit

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

achim_cux

From: cuxhaven, Germany
Posts: 2
Member Since: 11/19/07
posted January 22, 2008 5:27 PM

Hello Amit,

Thank you for your answer, but does not really solve my problem.

I agree, that Message Boxes are not practicable in a server application. The only Message-Box is “Do you really want to stop the server” ;-)
But in an early release it is useful to enable to interrupt the program and make little modification on the fly. Then restart it without killing any session. For Example, I want to insert a debug.print statement at any place.

But I think, I found out, how to manage it: After an interruption I must call the Receive-Methode one times to process new incoming data, if the ReceiveBufferCount is not equal zero. After this the Receive-Event fires again.

Best Regards
Achim
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted January 23, 2008 3:40 PM

Hello Achim,

Yes, if the ReceiveBufferCount has a positive value, then the Receive method should be called. The receive event will fire to indicate that the data is available.

Best Regards,
Amit

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP Winsock for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX