unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, AppEvnts, ExtCtrls, ScktComp;
type
TForm1 =
class(TForm)
Memo1: TMemo;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
ComboBox1: TComboBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Timer1: TTimer;
ApplicationEvents1: TApplicationEvents;
procedure ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket);
procedure ServerSocket1ClientConnect(Sender: TObject; Socket: TCustomWinSocket);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
ServerSocket1: TServerSocket;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
ServerSocket1 := TServerSocket.Create(
nil);
ServerSocket1.OnClientRead:=Form1.ServerSocket1ClientRead;
ServerSocket1.OnClientConnect:=Form1.ServerSocket1ClientConnect;
end;
procedure ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket);
begin
//Der Code, der ausgeführt werden soll, wenn ein Text von einem Client ankommt
end;
procedure ServerSocket1ClientConect(Sender: TObject; Socket: TCustomWinSocket);
begin
//Der Code, der ausgeführt werden soll, wenn ein Client sich verbindet
end;
end.