> I am trying to build a very basic chat server console app. Not overly
> complicated you would think. I have it built and it runs, but as soon
> as AddSocket() is called for the fourth time the app crashes and
> returns a NilObjectException... I am at a loss as to why it waits for
> the fourth connection.... here is a transcript of my debug output:
I am going to guess that you have a control array of sockets on the window
that you are using to pass back in your AddSocket event (or something
similar) and that you're getting out of bounds exceptions and hence passing
nil back in that event. Of course, without code, this is just
speculation...
Don't try to keep track of the sockets by keeping them in a pre-allocated
array. If you must keep track of them, append them to the array from the
AddSocket event since that event can (and will!) get called an arbitrary
number of times.
In any case, it would help to see the AddSocket code to diagnose what the
true problem is.
~Aaron
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|