ClientSocket.cpp 361 B

1234567891011121314151617181920212223242526
  1. #include "stdafx.h"
  2. #include "ClientSocket.h"
  3. #include "ChatRoomClientDlg.h"
  4. CClientSocket::CClientSocket()
  5. {
  6. }
  7. CClientSocket::~CClientSocket()
  8. {
  9. }
  10. void CClientSocket::SetDialog(CChatRoomClientDlg* pDialog)
  11. {
  12. m_pDlg = pDialog;
  13. }
  14. void CClientSocket::OnReceive(int nErrorCode)
  15. {
  16. CSocket::OnReceive(nErrorCode);
  17. if (m_pDlg)
  18. {
  19. m_pDlg->ReceiveText();
  20. }
  21. }