strcpy(sendBuf,"TRUE");
//将该学生信息插入学生链容器中
CLIENT_INFO client;
strcpy(client.stuID,m_account.GetBuffer(m_account.GetLength()));
client.listPos = p->m_clientCount;本文来自辣.文~论^文·网原文请找腾讯324'9114
strcpy(client.ip,inet_ntoa(pIoData->addr.sin_addr));
client.port = ntohs(pIoData->addr.sin_port);
memset(&client.addr,0,sizeof(sockaddr_in));
memcpy(&client.addr,&pIoData->addr,sizeof(sockaddr_in));
client.status = ONLINE;
CString sname;
CString seatSql = "select * from StudentInfo where stuID = '" + m_account + "'"; //查询数据库记录
RECORDSET rs = db.JExecuteWithRecordset(seatSql);
if (rs != NULL)
{
while (!rs->rsEOF)
{
client.seat = GIF(rs,"seatID");
sname = GTF(rs,"stuName");
rs->MoveNext();
}
}
strcpy(client.stuName,sname.GetBuffer(sname.GetLength()));
client_map.insert(map<int,CLIENT_INFO>::value_type(client.seat,client)); //向学生链容器中插入一条学生信息
char clientPort[6];
sprintf(clientPort,"%d",client.port);
char clientSeat[3];
sprintf(clientSeat,"%02d",client.seat);
//在学生在线列表上插入一条学生记录
p->m_lvi.iItem = p->m_clientCount;
p->m_lvi.iSubItem = 0;
p->m_lvi.pszText = account.id;
p->m_clientInfo.InsertItem(&p->m_lvi);
p->m_lvi.iSubItem = 1;
p->m_lvi.pszText = client.stuName;论文网http://www.751com.cn/
p->m_clientInfo.SetItem(&p->m_lvi);
p->m_lvi.iSubItem = 2;
p->m_lvi.pszText = clientSeat;
p->m_clientInfo.SetItem(&p->m_lvi);
p->m_lvi.iSubItem = 3;
p->m_lvi.pszText = client.ip;
p->m_clientInfo.SetItem(&p->m_lvi);
p->m_lvi.iSubItem = 4;本文来自辣.文~论^文·网原文请找腾讯324-9114
p->m_lvi.pszText = clientPort;
p->m_clientInfo.SetItem(&p->m_lvi);
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>
C++的多媒体屏幕广播教学系统设计 第17页下载如图片无法显示或论文不完整,请联系qq752018766