login about faq


I've been experimenting with the CK Socket class (version 9.4.0 in VB6), and I've run into a couple of problems with my own code, and the Chilkat sample code:

  1. It appears that the AsyncAcceptStart method is returning 1 even after a timeout (which is contrary to what the documention states, unless I've mis-understood).
  2. More seriously, after verifying that AsyncAcceptFinished = 1 and AsyncAcceptSuccess = 1, the call to the AsyncAcceptSocket hangs indefinitely until focus is restored to my VB6 application and then the whole IDE crashes.

This can be reliably reproduced (on my system at least) using the sample code available here

Is anyone else experiencing these problems, and is there a known solution?

Thanks in advance for any help.

asked Jan 07 '13 at 12:09

jpbro's gravatar image

jpbro ♦

The AsyncAcceptLog is as follows (Timeout occurred, but AsyncAcceptStart result = 1, and not 0 as expected):

ChilkatLog: AcceptNextConnection: DllDate: Dec 12 2012 UnlockPrefix: STATSLSocket Username: FIVEDEV:JB Architecture: Little Endian; 32-bit Language: ActiveX listenPort: 80 Timeout waiting to read socket or accept connection timeoutMs: 100 Timeout waiting to accept connection.. --AcceptNextConnection --ChilkatLog

(Jan 07 '13 at 12:13) jpbro ♦

I just tried the same code with 9.3.2, and while problem #1 still exists, problem #2 is resolved, so there must be a regression in 9.4.0 in the way that AsyncAcceptSocket returns the ChilkatSocket object.

(Jan 07 '13 at 12:21) jpbro ♦

Please check to see if this new build solves the problems:


answered Jan 08 '13 at 16:07

chilkat's gravatar image

chilkat ♦♦

The new build solves the problem with the IDE crashing on the AsyncAcceptSocket call, thanks a lot!

(Jan 08 '13 at 16:22) jpbro ♦

AsyncAcceptStart still returns 1 on timeout, but that's not a big deal (I can work around it). I suspect changing it to match the documentated behaviour might break some existing applications. But perhaps the documentation should be updated to reflect that 1/success is returned on timeout, instead of 0/failure.

(Jan 08 '13 at 16:22) jpbro ♦

The documentation needs to be updated. It is behaving correctly. The AsyncAcceptStart simply starts the accept operation in the background. It returns a success status if the operation is successfully started (i.e. the background thread is started). If the accept subsequently fails because of a timeout, then the AsyncAcceptSuccess property will be false/0.,

(Jan 08 '13 at 16:34) chilkat ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jan 07 '13 at 12:09

Seen: 2,359 times

Last updated: Jan 08 '13 at 16:34

powered by OSQA