Im still new to socket programming in C++. Currently i am doing a client-server communication. Not very understand how the code meant. Can someone help me to teach line-by-line the codes meaning.
The code as follows:
Code:void CSampleClientDlg::OnButtonSend() { SOCKET TempSoc; TempSoc = (SOCKET)m_hComm; TCHAR szBuf[255]={0}; m_bDataToSend = TRUE; CString strText = ""; m_Send.GetWindowText(strText); _tcscpy(szBuf,strText); int nRet = send(TempSoc,szBuf,strText.GetLength(),0); if(nRet == SOCKET_ERROR) AfxMessageBox("Error in Sending"); }



LinkBack URL
About LinkBacks


