elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Curso de javascript por TickTack


  Mostrar Mensajes
Páginas: [1] 2 3 4 5 6 7 8 9 10
1  Programación / Programación Visual Basic / Re: Multi thread en vb6 ? en: 22 Marzo 2012, 18:24 pm
Good evening 
My friend  depend what u want to build  !!!
There are some multithread sample   out   
Like  MCKSys Argentina the best book for everybody   
In my Sample u can see the Multithread part 
Iam not a guru  just try to play with Multithread 
U can try to make it  much  stable 
Thanks
2  Programación / Programación Visual Basic / Re: Multithread Socket (Thread per Socket)not Complete en: 10 Febrero 2012, 18:42 pm
Thanks  for reply   
have a good  night 
3  Programación / Programación Visual Basic / Re: Multithread Socket (Thread per Socket)not Complete 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 
4  Programación / Programación Visual Basic / Re: Multithread Socket (Thread per Socket)not Complete 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 


5  Programación / Programación Visual Basic / Re: Multithread Socket (Thread per Socket)not Complete en: 9 Febrero 2012, 16:15 pm
Sorry 

what is it  ?
Thanks for the reply 
6  Programación / Programación Visual Basic / Re: Multithread Socket (Thread per Socket)not Complete en: 6 Febrero 2012, 19:45 pm
No comments   ?
 
7  Programación / Programación Visual Basic / Multithread Socket (Thread per Socket)not Complete 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
8  Programación / Programación Visual Basic / Re: Recv Function Crash ( Noblocking Mode) en: 20 Julio 2011, 21:21 pm
Good evening

 Definetely my friends change a bit the Workthread and solve the Error
Código:
Public Function Workthread (ByVal Param As Long) As Long 
 ThreadInit.InitThread
 Dim DBuff As String
 Dim ReadBuff As String
 Dim sRec As Long
 tID = GetCurrentThreadId
 Add_DataClientStore ClientCount, nRet, tID
 WriteLog "New Client Arrive with Socket ID" & nRet & "On Thread ID:" & tID
 Do''While True
 DBuff = Space (4096)
 ClientStore (ClientCount). Sock_ID = nRet
 sRec = recv (ClientStore (ClientCount). Sock_ID, ByVal DBuff, Len (DBuff), 0)
 If sRec <> 0 And sRec <> SOCKET_ERROR Then
 ReadBuff = ReadBuff & Left (DBuff, sRec)
 WriteLog "Data Received.:" & ReadBuff & "Socket ID ..." & ClientStore (ClientCount). Sock_ID
 End If
 DoEvents
 Loop
 End Function

My server running and create for every Client a Workthread
 When i have 5 clients for example connected and try to send data I can send only in the last connected in the list(5)
 I suspect the problem come from me
 Is someone know something ?
Thanks for the time
9  Programación / Programación Visual Basic / Recv Function Crash ( Noblocking Mode) en: 19 Julio 2011, 23:40 pm
Good morning
 I try to make a Multithread socket .I pass the AcceptHandler in a new thread and Succesfully Workthread Start .
 The socket By Default is Blocking mode
 In blocking Mode Create Threads and can Send data to the Last Socket  Successfully
 If go to Set The Socket in NoBlocking Mode
Código:
Dim NonBlock As Long 
 NonBlock = 1
 If ioctlsocket (nRet, FIONBIO, NonBlock) = SOCKET_ERROR Then
 WriteLog "Socket Cannot Set NoBlocking"
 End If
My project Run Succesfully Create the First thread and The Second(ListenThread).When Client Connect start the ClientThread(WorkThread)and Crash .
 My Workthread

Código:
Public Function Workthread (ByVal Param As Long) As Long 
 Const MAX_BUFFER_LENGTH As Long = 8192 'Normal = 8192' MAX = 65536
 Dim Buffa (1 To MAX_BUFFER_LENGTH) As Byte
 Dim dBuff As String
 Dim ReadBuff As String
 Dim sRec As Long
 tID = GetCurrentThreadId
 Add_DataClientStore ClientCount, nRet, tID''/ / Store Data in a public type (sockid, threadid)
 WriteLog "New Client Arrive with Socket ID" & nRet & "On Thread ID:" & tID''/ / write data to listbox
 Do''While True

 ClientStore (ClientCount). Sock_ID = nRet
 sRec = recv (ClientStore (ClientCount). Sock_ID, Buffa (1), MAX_BUFFER_LENGTH, 0 &)
 ReadBuff = StrConv (Buffa, vbUnicode)
 [b]dBuff = Left $ (ReadBuff, sRec) [/b]
 WriteLog "Data Received.:" & DBuff & "Socket ID ..." & ClientStore (ClientCount). Sock_ID
 End If
 Loop
 End Function

The line to Crash is
dBuff = Left$(ReadBuff, sRec)
If Someone know anything
 Thanks for the time

 p.s Attach a ScreenShot with 505 Threads
 2:The Main thread and the Listenthread
 503 :Clients
 cpu usage =100%

This is the Error 
http://i54.tinypic.com/11qh94w.jpg
thanks for the time 
Good  night 
10  Programación / Programación Visual Basic / Socket api example en: 15 Julio 2011, 17:19 pm
Good afternoon 
I work in a  example with threads  .
Search around to find a small working example with Berkeley sockets.
If someone  have something  to  help me 
Thanks for the time 
Páginas: [1] 2 3 4 5 6 7 8 9 10
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines