- m_text->AppendText(_T("Test 3 begins\n"));
- m_text->AppendText(_T("(not implemented)\n"));
- m_text->AppendText(_T("Test 3 ends\n"));
+ unsigned char len;
+ char *buf;
+
+ m_text->AppendText(_("Test 3 begins\n"));
+
+ // This test is similar to the first one, but the len is
+ // expressed in kbytes - this tests large data transfers.
+
+ sock->SetFlags(wxSOCKET_WAITALL);
+
+ // Read the size
+ sock->Read(&len, 1);
+ buf = new char[len * 1024];
+
+ // Read the data
+ sock->Read(buf, len * 1024);
+ m_text->AppendText(_("Got the data, sending it back\n"));
+
+ // Write it back
+ sock->Write(buf, len * 1024);
+ delete[] buf;
+
+ m_text->AppendText(_("Test 3 ends\n\n"));