Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: ntaryl en 3 Febrero 2012, 20:32 pm



Título: Multithread Socket (Thread per Socket)not Complete
Publicado por: ntaryl en 3 Febrero 2012, 20:32 pm
Good evening
First want to say a Big Thanks to my friend Rookie Learn to Fly for the amazng example with ThreadPool and for the Help on QQ .Yukun for the beautiful multithread Console example .


My next Step is to Create Multithread with Forms and use Events .Like Example with Winsocks Array
Thanks for the time

http://www.mediafire.com/?h3krt1mfrbf02c2
P.s sorry for my English


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: ntaryl en 6 Febrero 2012, 19:45 pm
No comments   ?
 


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: m0rf en 9 Febrero 2012, 09:41 am
Can you put it on pastebin?


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: ntaryl en 9 Febrero 2012, 16:15 pm
Sorry 

what is it  ?
Thanks for the reply 


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: m0rf en 9 Febrero 2012, 17:20 pm
Search on google.


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: Speeding en 9 Febrero 2012, 18:28 pm
Search on google.

You're asking him to use paste bin. So your answer is really stupid and not polite.


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: 79137913 en 9 Febrero 2012, 18:48 pm
HELLO!!!

You're asking him to use paste bin. So your answer is really stupid and not polite.

+1



I really do not understand this to much...
The regular sockets (winsock and socketmaster) already are multithread i think.

For example with 2 winsocks i have this code:
Código:
Private sub Winsock1 data arrival()
Do
doevents
Loop
end sub
Private sub winsock2 data arrival()
Debug.print "a"
end sub

If i send information to the first socket the program will enter in an endless loop but if while the program its in that loop i send information to socket2 it will print "a" in the debug window.

it's like reinvent the wheel.

Plz correct me if im wrong.

P.D: I don't read the code, i only have tested the software.

THANKS FOR READING!!!


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: ntaryl en 9 Febrero 2012, 19:21 pm
Good afternoon 
My friend  79137913 regural in vb 6.0 the socket work one by one Like (First Send after Second  after third etc)
In my Example  u can see the Sockets work at the same time .
all the sockets send at the same moment 
Hope  explain a bit 




Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: 79137913 en 10 Febrero 2012, 01:00 am
HELLO!!!

Oh! i see this socket sends and recive with multithread, and the regular socket only recive with multithread.

Cool but! (i allways have a but in my pocket XD)
with the regular sockets with this code:

Código:
Public sub SendInformation()
Winsock1.senddata 5mbDatastring
Winsock2.senddata 5mbDataString
End Sub

The first socket will start the sending process and the code will go to the next instruction winsock2.senddata 5mbDataString when the second socket starts the process the winsock1 and 2 would be sending at the same time.

What do you think?

THANKS FOR READING!!!


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: BlackZeroX en 10 Febrero 2012, 08:39 am
Note: The multi thread are unstable in vb6

Dulces Lunas!¡.


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: ntaryl en 10 Febrero 2012, 16:31 pm
Good afternoon 
My Friend 79137913 in ur post u show me a way with two sockets  .When u have 10 clients what u will do ?(10 sockets running) ?

Yes BlackZeroX (Astaroth) is  unstable  some times .But  There is  a way to fix it   ....
Thanks 


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: 79137913 en 10 Febrero 2012, 17:53 pm
HELLO!!!

Well...

Yes, in my post i show the way to send 2 strings at the same time and the way to recive at the same time... you are right about the practicality of your method but what i wanna expose it's that with the regular sockets you can do that because each socket is a separate process.

although...

Nothing XD i'm just kidding :P.

P.S: We need to compare the memory and processor consumption.

THANKS FOR READING!!!


Título: Re: Multithread Socket (Thread per Socket)not Complete
Publicado por: ntaryl en 10 Febrero 2012, 18:42 pm
Thanks  for reply   
have a good  night