Registriert seit: 6. Jan 2005
Ort: Lübbecke
575 Beiträge
Turbo C++
|
Re: ServerSocket Prozeduren zuweisen
9. Okt 2005, 22:35
Da issa:
Delphi-Quellcode:
type
TMyServerSocket = class(TServerSocket)
private
procedure ClientConnect(Sender: TObject; Socket: TCustomWinSocket);
end;
var
Self: TComponent;
Server: TServerSocket;
procedure TMyServerSocket.ClientConnect(Sender: TObject; Socket: TCustomWinSocket);
begin
//blabla
end;
begin
//Server starten
Server := TMyServerSocket.Create(Self);
with Server do
begin
Port := StrToInt(ServerPort);
ServerType := stNonBlocking;
ThreadCacheSize := 10;
OnClientConnect := ClientConnect;
Active := True;
end;
end.
Chuck Norris has counted to infinity ... twice!
|