Let's straight to the point.
I would like to share about this :

1). Make new project with MFC AppWizard (exe), select Dialog Based on step 2 , klik Support Windows Socket, and then Hit Finish Button.

2). Design GUI interface by these folowing fiellds :
Componen ID Componen Properties Point
-------------------------------------------------------------------------------
Main Dialog IDD_SERVER_DIALOG Caption Server
Static_Text IDC_STATIC Caption Server Port
Edit Box IDC_EDIT1 - -
List Box IDC_LIST1 - -

3). Add Varibles on class CServerDlg :
Variable Type Variable Name Access
------------------------------------------------------------------------------------
SOCKET sListen Public
SOCKET sClient[n] Public
Struct Sockaddr_in local Public
Struct Sockaddr_in client Public
int nRow Public
int nClients Public

4). On Class Wizard we also need add some variable :
Control ID Variable Name Category Variable Type
--------------------------------------------------------------------------------------------------------------
IDC_EDIT1 m_sPort Value CString
IDC_LIST1 m_cList Controll CListBox
IDOK m_cStartButton Controll CButton

5). Double click on Start Button and then put these folowing source :

WSADATA wsd;
CString str,m_sError;
int iSize;
CWaitCursor wait;

UpdateData (TRUE);
for (int i=0;i<10;i++)
sClient[i]=NULL;

if (WSAStartup (MAKEWORD(2,2), &wsd) !=0)
{
AfxMessageBox ("Failed to load winsock!");
return;
}

sListen = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
if (sListen == SOCKET_ERROR)
{
m_sError.Format(*socket() failed: &d", WSAGetLastError() );
AfxMessageBox (m_sError);
return;
}
local.sin_addr.s_addr = htonl(INADDR_ANY);
local.sin_family = AF_INET;
local.sin_port = htons(atoi(m_sPort));
iSize = sizeof (local);

if (bind(sListen, (struct sockaddr *)&local,iSize) ==SOCKET_ERROR)
{
m_sError.Format(*bind() failed: &d", WSAGetLastError());
AfxMessageBox(m_sError);
return;
}
nRow = 0;
nClients = 0;
m_cList.InsertString(nRow, "Server Online");
listen(sListen, [n]);
m_cStartBtn.EnableWindow(FALSE);
AfxBeginThread(&thread, [n]);

This application using Thread for listening client connection to Server.

I run this on our computer at home. And try to connect on my Laptop at University, and we did it. Perhaps there is anyone here could add the source ? i would like to get any idea from AO ppl.

-Mike