Just learning Delphi, refer to a code on the net, want to write an example of a UDP send pictures, the following code Var Filestream: TMemoryStream; The begin Filestream:=TMemoryStream. Create; Savetojpgstream (filestream);//the file to the filestream Idpsrvr1. SendBuffer (* 127.0.0.1 *, 8009, filestream filestream. Size);//run to go wrong here, show socketerror 10014 Filestream. Free end; Please guide, why is this so??? Where is wrong?????? The great spirit guide, or a great god can reference the UDP send demo pictures not Using Delphi7 indy 9
CodePudding user response:
Indeed no one...
CodePudding user response:
The definition of didn't see you ClientAddrLen forehead?
ClientAddrLen=sizeof (ClientAddr);
CodePudding user response:
Length must be specified, initialize the correct values, Otherwise is prone to 10014