The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: AgentSmithers on June 03, 2009, 09:10:44 AM

Title: Fastest Way To Socket Connect Send then close and Repeat
Post by: AgentSmithers on June 03, 2009, 09:10:44 AM
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?
Title: Re: Fastest Way To Socket Connect Send then close and Repeat
Post by: Mark Jones on June 03, 2009, 09:02:59 PM
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.
Title: Re: Fastest Way To Socket Connect Send then close and Repeat
Post by: AgentSmithers on June 03, 2009, 11:16:11 PM
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?
Title: Re: Fastest Way To Socket Connect Send then close and Repeat
Post by: redskull on June 04, 2009, 01:18:30 AM
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
Title: Re: Fastest Way To Socket Connect Send then close and Repeat
Post by: BogdanOntanu on June 04, 2009, 03:37:29 AM
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