Fastest Way To Socket Connect Send then close and Repeat

Started by AgentSmithers, June 03, 2009, 09:10:44 AM

Previous topic - Next topic

AgentSmithers

What is the fastest way i can Open a Socket Send Data close and Repeat, For instance

Whats Faster

A:
prep data, Start a Thread with the data as a Param loop to start
Thread opens a socket sends data and then close then closes thread

b:
start one thread
open 10 sockets
loop through sockets to send data closing then after data is sent

c:
start 10 threads each opening and closing and sending data sync

or maybe another scenario?

EDIT: Is their a simple way to messure Clock Speed on Program or how Many ClockCycles it takes to complete a Function/Command?

Mark Jones

First of all, these are two completely different questions.

Secondly, what you talk of reeks of DoS attacks. Again, if you want help with that kind of talk, there are other forums out there for it.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

AgentSmithers

Yes, I'm not asking for code I'm asking what the fastest method would be I'm not trying to do a dos attack and would be perfectly legit in a situation to send the same information to multiple host. and I figure it would be nice to keep the questions in one post, I do not believe their is a reason to post two small questions separate.

Come to think of it even something as simple as Malloc in a loop without free can be a dos cant it be? does it mean your are not going to show someone how to allocate memory dynamicly :-p?

redskull

Seriously, why is this guy still a member?  Not only is he intent on toeing the wrong side of the forum rules, but he clearly thinks we're all morons.

-r
Strange women, lying in ponds, distributing swords, is no basis for a system of government

BogdanOntanu

Quote from: AgentSmithers on June 03, 2009, 11:16:11 PM
...
Come to think of it even something as simple as Malloc in a loop without free can be a dos cant it be? does it mean your are not going to show someone how to allocate memory dynamicly :-p?

"nice" try  :green

Thread locked
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro