Autor Beitrag
Steve1024
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 141

Windows 2K, XP, 7 & Server 2003 - 2008; Linux (Ubuntu, Fedora)
D7, D05, D06, D09, DXE
BeitragVerfasst: Do 15.09.05 19:51 
Dies sind Komponenten bzw. Objekte für Delphi.

Gechrieben in Delphi 7.

Diese Objekte sind für die Kommunikation zwischen 2 oder sogar mehr Prozessen.
Es gibt jeweils ein Server und ein Client-Objekt.

Es sind dort zwei Arten von Objekten:
TSCom-Objekten - um mit Integern zu kommunizieren
TSDataCom-Objekte - um Daten zwischen diesen Prozessen auszutauschen.

Hier ein Beispiel zur Anwendung:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
  // Server
    FService := TSDataComServer.Create;
    FService.ServiceName := 'Test';
    FService.ServicePort := 10;
    FService.Active := TRUE;

    FService.OnRead := _ServiceRead;

  procedure TForm1._ServiceRead(Sender:TObject;AConn:Integer;const Data;Count:Integer);
  var Bool : Boolean;
  begin
    // ...
    Bool := Boolean(Data);
    Bool := not Bool;
    FService.SendData(AConn,Bool,SizeOf(Bool));
   end;

// *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

  // Client
    FClient := TSDataComClient.Create;
    FClient.OnRead := ConnectionRead;
    FClient.ServiceName := 'Test';
    FClient.ServicePort := 10;
    FClient.Active := TRUE;

  procedure TForm1.ConnectionRead(Sender:TObject;const Data;Count : Integer);
  Begin
    FClient.SendData(FALSE,SizeOf(Boolean));
  end;


Diese Objekte sind wie z.B. TCP Komponenten ansprechbar.

D.h. mit ServiceName, ServicePort usw. schaut es euch einfach an.

Falls fragen sind, mailt mir einfach:

Stephan.Schamberger@innova-ps.de

Source gibt es auch gegen 20€ per e-Mail.
Einloggen, um Attachments anzusehen!
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Do 15.09.05 20:28 
kommt mir die frage auf warum man nicht gleich TCP nimmt ;)

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Steve1024 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 141

Windows 2K, XP, 7 & Server 2003 - 2008; Linux (Ubuntu, Fedora)
D7, D05, D06, D09, DXE
BeitragVerfasst: Do 15.09.05 21:25 
Weil dieses Programm nur lokal Funktioniert... d.h. man braucht keine Netzwerkkarte und kein IP-Protokoll installiert zu haben...
Über das Netzwerk kann auch nicht darauf zugegriffen werden...(außer man schreibt was dafür)
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Do 15.09.05 21:36 
soviel ich weiß kann ich das TCP protokoll auch ohne netzwerkkarte installiert haben und es sollte auch funktionieren (ich hoff doch mal)

wäre nett wenn du doch mal schreibst welche methode du benutzt, wie hoch die datenrate ist, im moment gibt es viele andere alternativen (open source) die ziemlich schnell sind. also kurz erklären warum man gerade deine komponente benutzen soll (die man noch nicht mal selbst abändern kann wenn man will)

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Do 15.09.05 21:37 
Gibts sowas nicht schon längst in Form von DDE? :gruebel:

Alstar
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Do 15.09.05 23:24 
Sowas gibts hier schon als OpenSource. Einmal vom BenBE und einmal von mir ...

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!