holaEl codigo con el cual envio un objeto mediante SendBuf:
Aki envio un objeto:
bool __fastcall TForm1::MiFuncion(TObject *Send)
{
TPanel *panel;
panel=(TPanel*)Send;
if(FormInternet->Internet)
{
if(!FormInternet->Servidor)
FormInternet->ClientSocket1->Socket->SendBuf(panel,1024);
.
.
.
Aki recojo el objeto:
void __fastcall TFormInternet::ServerSocket1ClientRead(TObject *Sender,
TCustomWinSocket *Socket)
{
TPanel *panel;
int bytes=Socket->ReceiveLength();
int entra=Socket->ReceiveBuf(&panel,bytes);
if(entra!=-1)
Form1->movimiento(panel);
}
Problema: Cuando no se envia ningun byte, sendbuf devuelve -1. La variable "entra" vale -1, por que? cual es el problema?
Saludos.