Autor Beitrag
Niels_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 117



BeitragVerfasst: Mo 14.02.05 17:36 
Ich habe ein kleines Prog, dass mit serversocket1.Socket.Connections[con-1].SendBuf(XYZ) einen String sendet. Nun möchte ich aber, dass auch TMemorystreams gesendet werden sollen (da ich bilder übersenden möchte: www.dcw-group.net/dc...delphi_dateitransfer ). Vorher war immer, dass der erste Char im String von XYZ mir sagt, was gesendet wird. Kann ich das kombinieren, so dass gesendet wird: 'B'+Tmemorystream (B steht für Bild :D )????

Thx for help
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: Mo 14.02.05 17:37 
bitte mal source posten!

_________________
Aus dem Urlaub zurück!
Niels_ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 117



BeitragVerfasst: Mo 14.02.05 17:43 
da gibt´s nicht so viel...

Client:
(beim Senden)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
var k:string[255];
  k:='t'+inhaltsenden;  //t für "jetzt kommt text" und inhaltsenden = zu sendener text.
       while clientsocket1.Socket.Sendbuf(k,sizeof(k)) = -1 do
        begin end;


(empfang)
ausblenden Delphi-Quelltext
1:
2:
var k:string[255];
  socket.ReceiveBuf(k,sizeof(k));


Server:
Sendet den Buf einfach nur weiter (also kombination aus beidem)

gibt´s vielleicht auch eine möglichkeit ein Bild via Buffs zu senden??? Das wäre natürlich ideal!!