I am wanting to create a server side program that will create a socket using CSocket, and listen on that port continuely until a client program calls and connects to that port from a remote location. I have the client up and running, it will already go and look for that port, but the problem with the server is, it opens the port and then closes the port right afterwards. Here is an example of what I got:
Keep in mind I am using Dialog boxes not SDI or MDI

CForm::IDConnect()
{
UpdateData();
CSocket Server;
Server.Create(m_Port);
if (Server.Listen())
...

}
That is the main Idea of my program for the server, however I am not quite sure what to put after the if...
Can anyone Help?
Thankx in advance.