File tree Expand file tree Collapse file tree 3 files changed +5
-23
lines changed Expand file tree Collapse file tree 3 files changed +5
-23
lines changed Original file line number Diff line number Diff line change @@ -1345,18 +1345,15 @@ CString str = strText;
1345
1345
1346
1346
}
1347
1347
1348
- void CMUSHclientDoc::ReceiveMsg (char * buff, int count )
1348
+ void CMUSHclientDoc::ReceiveMsg ()
1349
1349
{
1350
+ char buff [1000 ]; // must be less than COMPRESS_BUFFER_LENGTH or it won't fit
1351
+ int count = m_pSocket->Receive (buff, sizeof (buff) - 1 );
1350
1352
1351
1353
Frame.CheckTimerFallback (); // see if time is up for timers to fire
1352
1354
1353
1355
if (count == SOCKET_ERROR)
1354
1356
{
1355
-
1356
- DWORD errcode = GetLastError ();
1357
- if (errcode == WSAEWOULDBLOCK || errcode == 0 )
1358
- return ; // it's ok, nothing to do
1359
-
1360
1357
// don't delete the socket if we are already closing it
1361
1358
if (m_iConnectPhase == eConnectDisconnecting)
1362
1359
return ;
Original file line number Diff line number Diff line change @@ -1406,7 +1406,7 @@ class CMUSHclientDoc : public CDocument
1406
1406
const bool bEchoIt,
1407
1407
const bool bQueueIt,
1408
1408
const bool bLogIt);
1409
- void ReceiveMsg (char * buff, int count );
1409
+ void ReceiveMsg ();
1410
1410
void DisplayMsg (LPCTSTR lpszText, int size, const int flags);
1411
1411
void AddToLine (LPCTSTR lpszText, const int flags);
1412
1412
void StartNewLine_KeepPreviousStyle (const int flags);
Original file line number Diff line number Diff line change @@ -29,22 +29,7 @@ CWorldSocket::CWorldSocket(CMUSHclientDoc* pDoc)
29
29
30
30
void CWorldSocket::OnReceive (int nErrorCode)
31
31
{
32
-
33
- char buff [1000 ]; // must be less than COMPRESS_BUFFER_LENGTH or it won't fit
34
-
35
- while (true )
36
- {
37
- int count = m_pDoc->m_pSocket ->Receive (buff, sizeof (buff) - 1 );
38
- m_pDoc->ReceiveMsg (buff, count);
39
-
40
- if (count == 0 ) // connection closed or nothing left
41
- break ;
42
-
43
- if (count == SOCKET_ERROR)
44
- break ; // some error or other
45
-
46
- } // end of while
47
-
32
+ m_pDoc->ReceiveMsg ();
48
33
CAsyncSocket::OnReceive (nErrorCode);
49
34
}
50
35
You can’t perform that action at this time.
0 commit comments