Hi guys, thanks for the feedback.
taylor-design wrote:
You didn't specify what the server component does,
In this first test I was testing the functionality of the serversocket and the SSLsocket to see if and how well they work handling incoming connections, if SSL certificate working correctly, will it now work with a console app and secure incoming connections, etc?
This test was not yet about sending/receiving data, that comes later

The reason I want to use a console app is because as you guys know console apps use less server resources and possibly have better performance than a desktop version and there is no need for a user interface on a server app as most config/use will be via remote location. Though if I decide to later purchase a mac mini and run OS X server I may want to use a desktop version of my server app because I'd be able to remotely control the UI via UI, graphically.
It really depends on the performance difference and server resource cost (ram, cpu, etc.).
I have not tested the differences yet.
One concern is I remember there was and maybe still is a console app serversocket or SSLsocket bug where it wouldn't accept incoming connections, making it useless. So that will be part of my testing needs.
Over time I will have to test many sockets since often they are broken and the project I am making uses a lot of different sockets.
taylor-design wrote:
so I tried recreating the client as you described it and having it connect to PayPal's https.
No crashes using RB2012r2.1 on Mac OS 10.7.5.
Did you repeatedly connect? That seems to be where the crash happens.
My example app connects and accepts the connection the first time without crashing.
It's the later, successive connects that crash it in RS 2012.
Right now I'm guessing the crash is not on the server end but on the client side but I have not yet throughly tested. I haven't given it much time as I've went back to CSS and developing with website portion of this project so I'm doing my testing in my extra time and this bug brings back bad feelings of how broken sockets are in RS

taylor-design wrote:
lukus001 had some good comments. The test client absolutely needs to keep references to open sockets, and should properly close them as well. Especially if you want a valid test (when a socket falls out of scope it should close on its own, so you're not actually testing multiple concurrent connections).
Yes he did have some good comments but right now they don't really apply to this initial test, nor do they solve the crashing problem.
Scope shouldn't be a problem because it's a property of app so it never goes out of scope. I don't remember if reassigning the variable is considered a scope issue or not but it shouldn't cause a crash.
For my initial test I didn't need references and RS should keep it's own internal reference so that shouldn't throw an error. I wasn't interested (yet) in looping through on the client side since I was focused on testing serversocket and SSL socket receiving connections.
taylor-design wrote:
Aside from that, we would have to know a lot more to try and replicate the issue and help out.
Yes, that would be good, thank you

Daniel I can email you the test project if you'd like to see the code yourself.
lukus001 wrote:
I'm finding it a bit hard to understand what the problem you're experiencing is exactly.
If i read correctly, you're trying to spawn multiple connections in a normal property rather than an array?
Hi.
Yes I was using a property of app so scope is not a problem and since I didn't need to loop through the connects on the client side I didn't initially use an array as I was focused on the serversocket testing.
lukus001 wrote:
Have you tried it with an array and appending each new socket to that, so there is always a reference kept as the error might be down to sockets and RS's object reference counting?
Yup, I also tried using an array on the client side, same result. I actually dug up some old projects which I've used socket arrays with.
Ran fine on 2010 5.1, same crash on 2012.x as did my first test without using the client side socket array.
lukus001 wrote:
If you dont want to use an array, try closing the socket before creating a new one in the same property.
Yes tried that also, same results.
It is also possible the serversocket code I'm using is wrong, I haven't really gone over it much because it's working in 2010 5.1 but fails in 2012. That indicates either RS 2010 5.1 is buggy and my code is wrong but the bug failed to catch it, or RS 2012.x is buggy and the code is correct.
timhare wrote:
Sounds like a bug, to me.
But you gotta ask yourself one question: do you feel lucky?
No, I mean, you gotta ask yourself one question: do you really want to implement the server side in RB?
I do all my server code in php and write the client in RB using httpsercuresocket/httpsocket. Let the web server handle ssl for you. Plus, it's a MUCH smaller footprint on the server.
taylor-design wrote:
I cannot agree with the sentiment expressed here. I have developed and deployed multiple custom client/server socket apps for my clients using RB. They are fast and very stable. By "stable" I mean that they run without issue and without reboots for upwards of a year.
Daniel, you should consider that many experienced developers some of which are networking professionals are often complaining about the broken sockets / networking functions in REAL Studio / XOJO. I myself am not a networking professional but over the years I have used almost every type of socket REAL Studio offers and I can tell you there have been far too many bugs and broken things with the sockets. These socket bugs are my and many other customer's number 1 complaint about this product and they never seem to get fully fixed.
If your experience has been different to ours then I think this is because you don't use as many sockets as I and other customers often do?
I appreciate the help guys and I haven't gone over my code in detail yet but I'm still thinking this is an RS / XOJO bug

Remember my code is working fine in 2010 5.1 but crashes in 2012.x.