Einzelnen Beitrag anzeigen

Beckman

Registriert seit: 12. Jul 2004
205 Beiträge
 
#4

Re: console application --> events --> clientsocket pr

  Alt 15. Aug 2004, 19:53
Code:
procedure Connect();
begin
writeln('connect() executed!');
  if Client = nil then
        begin
        Client := TClientSocket.Create(nil);

        Client.OnConnect := Event.ClientConnect;
        Client.OnConnecting := Event.ClientConnecting;
        Client.OnDisconnect := Event.ClientDisconnect;
        Client.OnError := Event.ClientError;
        Client.OnRead := Event.ClientRead;
        writeln('client created');
        Event := TEvent.Create;
        writeln('event created');
        end;

  Client.Host := '192.168.0.3';
  Client.Port := 6667;

  try
        begin
        Client.active := true;
        writeln('client set active');
        end;
        except writeln('could not set client active');
  end;

  try
        begin
        client.Open;
        writeln('client opened');;
        end;
        except writeln('could not open client');
  end;

end;

jetzt ists drin

aber aendert sich trotzdem nix dran :/

es kommt trotzdem kein 'connected'
und schreiben kann ich auch nix. hin/zurueck...


Code:
C:\Dokumente und Einstellungen\Beckman\Eigene Dateien\devel\cs02>cs.exe
/connect
connect() executed!
client created
event created
client set active
connecting
client opened
  Mit Zitat antworten Zitat