Click to See Complete Forum and Search --> : [RESOLVED] CSocketPlus 1.1 bug - Connect Event never fires


Dave Sell
October 30th, 2006, 10:47 PM
Is it just me, or is there a bug in the awesome CSocketPlus Class.

I try the sample "Multi Socket TCP Chat" Project that works just splendidly, but I the _Connect Event never gets fired on connect.


I traced the bug down to the CSocketPlus.cls, PostSocket function.

The code block responsible for firing this event is in the Select Case FD_CONNECT.

This function never gets called when the CSocketPlus Object actually does connect.

I have a cheezy workaround, piggybacking off the FD_ACCEPT function, but would rather fix the problem.

Anyone else know about this?

Great Class either way.

Dave

MikeAThon
October 30th, 2006, 11:00 PM
I'm not familiar with the CSocketPlus class. Can you provide a link and also a link to the sample "Multi Socket TCP Chat" Project?

Mike

Dave Sell
October 31st, 2006, 05:43 AM
A: http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=54681&lngWId=1

B: This may be less of a bug, and more of a feature, after further consideration. Basically, the _Connect Event does fire when a client has connected to a server. I was noticing the _Connect Event does not fire for a server, when a client connects to it. I may withdraw my claim that this is a bug.

Dave Sell
October 31st, 2006, 05:59 AM
I wanted to be notified when a server had accepted a client's connection. I added a new Event, "Accepted". There is no bug, sorry for the confusion.

MikeAThon
October 31st, 2006, 09:00 AM
Good, because it's a Visaul Basic OCX for which I can't help you.

Mike