void __fastcall TForm1::Button1Click(TObject *Sender)
{
int size = MemoEnter->GetTextLen() + 1;
wchar_t *szBuff = new wchar_t[size];
memset(szBuff, 0, sizeof(szBuff));
MemoEnter->GetTextBuf((wchar_t *)szBuff, size);
TcpClient->SendBuf(szBuff, sizeof(szBuff));
LogOut->Lines->Add(szBuff);
delete []szBuff;
}
Why doesn't TcpClient send anything? Server is ok. connection is ok. Telnet sends data to the server but this code does not.
Guys! i tried to
TcpClient->SendBuf("fsd", 3);
and still got nothing
This may be contributing to the problem:
Change:
To:
If the second argument of
TcpClient->SendBuf()is the number of bytes, not characters, then change to: