|
-
Sep 6th, 2001, 09:45 PM
#1
Thread Starter
New Member
Creating a server using MFC
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.
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
|