Autor Beitrag
barrais
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Sa 22.03.08 18:27 
Hallo,
ich habe folgendes Problem; es werden Binäre Daten per UDP gesendet,und zwar der richtige Anzahl an Bytes aber der Inhalt ist falsch , anstatt $013141, wird jedesmal was anderes gesendet mal $e025d5 mal 50c2d5 mal 2e5dd5...
der Code sieht folgendermaßen aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
var 
  stream : TStringStream;
  s:String;
begin 
  try  
  stream := TStringStream.Create(''); 
  stream.WriteBuffer(Buffer[0], sizeof(buffer));   
  s := stream.DataString;
  UDPServer.SendBuffer(IP_Adresse,UDP_PORT, s, stream.Size);        
  finaly
   stream.Free;
  end;


Buffer ist so definiert
ausblenden Delphi-Quelltext
1:
2:
3:
4:
const 
Buffer :array[0..2of byte = ( $01
                                $02
                                $03 );


Wieso werden die Bufferdaten denn manipuliert?

Danke
PeterPain
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 83



BeitragVerfasst: Sa 22.03.08 19:36 
Bitte den Crosspost angeben, wird ungern gesehen.
barrais Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: So 23.03.08 00:55 
ähh, ist das das gleiche Forum oder wie jetzt, was heisst denn das wird hier ungern gesehen....?!