A ver, he buscado el primer ejemplillo que tenía a mano y en ese en concreto utilizo esta función:
Código Delphi
[-]
function SendCommand(ASocket: TCustomWinSocket; ACommand: TSocketCommand;
AParams: array of string):Boolean;
var
Str, StrParams:String;
i:Integer;
begin
Result := False;
StrParams := '';
if (ASocket.Connected) then begin
Debug.LogSocket('Enviando comando: ' + SocketCommandToStr(ACommand));
for i := Low(AParams) to High(AParams) do begin
StrParams := StrParams + Aparams[i] + CHAR_MESSAGE_SEP;
Debug.LogSocket(' ' + Aparams[i]);
end;
Str := SocketCommandToStr(ACommand);
Str := Str + StrParams;
ASocket.SendText(Str);
Result := True;
end;
end;
A parte de las líneas de Debug (que es para una herramienta interna) y el SocketCommandToStr (que lo único que hace en convertir un enumerado en String), como ves básicamente lo que hago es usar:
ASocket.SendText(Str)