|
-
Mar 30th, 2004, 08:21 AM
#1
Thread Starter
New Member
Sockets and Threads (??)
Hi there,
I've been trying to work with sockets. (which seems to be TOTALLY different then it was in VB6 ) But no problem, I've successfully created 2 working classes. 1 Client class and one Listener.
Both working very well, but their occurs this 'problem'. While listening, there's a sort of an infinite loop being created until a client connects. Which obviously that, during this loop, means the rest of the programme freezes. I've been doing searches on this forum and I THINK that the solution is to work with "threads"... ?
If that's the case, then the winsock control in VB6 created several threads itself ?
What I THINK there's to do, is to create a thread that contains the "main" programme, a thread that makes the socket listen for a connection, a thread that waits for datareceiving once a client is connected....
Can anyone provide me with some information & explanation on this "thread handling" ? ... 
Vamp
-
Mar 30th, 2004, 11:24 PM
#2
Addicted Member
in the listener start a background thread where the infinite loop is. you wont have any problem on the client side if not creating a thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|