J
jm
I have a client and a server (of course). The listener, from the code
I got on Microsoft (MSDN) uses a While (true) to wait on accepting a
socket. When the message sent to the listener application is
complete, the message is processed and the While loop, since true,
goes back and waits for another socket.
The problem I have is that there are other functions and procedures
that are called within this loop. They are never being activated
because the While(true) is always running. The calls are in the
middle of the while loop:
While (true)
{
if (x==y)
{
call_this_procedure(); //may get called, but never works; have
stepped thorough it seen that it hits this, it just doesn't work; take
out the While(true) and it works;
}
}
but that "call_this_procedure()" never works. If I take out the
While(true) it works.
Someone told me I needed to use async sockets. Again, using MSDN, I
was able to get some code working, but the result was the same.
Again, they had the listener in the While(true) construct. I cannot
get things to work right this way. Can someone please advise. Thank
you for any help.
I got on Microsoft (MSDN) uses a While (true) to wait on accepting a
socket. When the message sent to the listener application is
complete, the message is processed and the While loop, since true,
goes back and waits for another socket.
The problem I have is that there are other functions and procedures
that are called within this loop. They are never being activated
because the While(true) is always running. The calls are in the
middle of the while loop:
While (true)
{
if (x==y)
{
call_this_procedure(); //may get called, but never works; have
stepped thorough it seen that it hits this, it just doesn't work; take
out the While(true) and it works;
}
}
but that "call_this_procedure()" never works. If I take out the
While(true) it works.
Someone told me I needed to use async sockets. Again, using MSDN, I
was able to get some code working, but the result was the same.
Again, they had the listener in the While(true) construct. I cannot
get things to work right this way. Can someone please advise. Thank
you for any help.