I have a PHP socket server which I need to do some performance meassurements on to see how many connections it can handle. For this I thought of using NCat but I don't have any preference for using it so please suggest others if they are any better suited for my need. I both have a Windows and Linux/CentOS client so a bash
shell script would also be fine.
What I want to archieve is to connect to my socket server at port tcp:10000
. This will initate a new fork on my server where it will process all data within this connection. Then the client should send X lines of text but each line much be followed by a couple of seconds of sleep before sending the next line. I want then to startup Y instances of this approach and somewhere I should reach the limit for when my server cannot handle anymore connections.
One line of text I want to send could for example be:
93945[,015539,a3045538,0023,6926b.1,,9,9119,6,1,0,,,801,100,0,0,01,,21y18
My problem is that I can't figure out how to do this with NCat!? My knowledge with NCat stops after being able to do this:
echo FooBar | ncat 192.168.1.10 10000
.. and this is only one line in its own connection.