Re: [twsocket] UDP Problem
I believe I have installed the packages correctly. The Overbyte samples work perfectly. When I went to my own application, I had to manually put the VC32 folder in the library path. The application compiles okay, but WSocket is nil on the first call (similar to the SendButtonClick procedure) and I get an out of range error. On Jan 7, 2013, at 12:17 PM, Arno Garrels arno.garr...@gmx.de wrote: Jack Moran wrote: That's probably my problem. How do I install ICS? I'm just adding files to the project. I'm using Delphi XE2 and ICS Gold. Quoted from ReadMe7.txt: {code} INSTALLATION USING THE INSTALL PROJECT GROUPS For each Delphi and C++ Builder version one project group is provided in directory .\Install: Delphi 7 : D7Install.bpg Delphi 2006 : D2006Install.bdsgroup Delphi 2007 : D2007Install.groupproj Delphi 2009 : D2009Install.groupproj Delphi 2010 : D2010Install.groupproj Delphi XE: DXeInstall.groupproj Delphi XE2 : DXe2Install.groupproj Delphi XE3 : DXe3Install.groupproj C++ Builder 2006 : CB2006Install.bdsgroup C++ Builder 2007 : CB2007Install.groupproj C++ Builder 2009 : CB2009Install.groupproj C++ Builder 2010 : CB2010Install.groupproj C++ Builder XE : CBXeInstall.groupproj C++ Builder XE2 : CBXe2Install.groupproj C++ Builder XE3 : CBXe3Install.groupproj 1 - Do a File/Open Project, navigate to the Install directory, select the correct file and open it. The project manager view should now display two package projects, one run-time and one design-time package. The run-time package name contains the Run suffix. The design-time package name contains the Design suffix. 2 - Select and Build the run-time package (do not install). 3 - Select and Install the design-time package. After a few seconds, you should have a dialog box telling you the package has been installed with a bunch of new components registered in the Tool Palette under Overbyte ICS and Overbyte ICS SSL. Then do a Save All and a Close All. {code} If you need ICS for FireMonkey get ICSv8 downloadable from: http://wiki.overbyte.be/wiki/index.php/ICS_Download and you must install DXe2InstallVclFmx.groupproj instead. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP Problem
Never mind! I see now I had to add the WSocket from the pallet. On Jan 7, 2013, at 12:17 PM, Arno Garrels arno.garr...@gmx.de wrote: Jack Moran wrote: That's probably my problem. How do I install ICS? I'm just adding files to the project. I'm using Delphi XE2 and ICS Gold. Quoted from ReadMe7.txt: {code} INSTALLATION USING THE INSTALL PROJECT GROUPS For each Delphi and C++ Builder version one project group is provided in directory .\Install: Delphi 7 : D7Install.bpg Delphi 2006 : D2006Install.bdsgroup Delphi 2007 : D2007Install.groupproj Delphi 2009 : D2009Install.groupproj Delphi 2010 : D2010Install.groupproj Delphi XE: DXeInstall.groupproj Delphi XE2 : DXe2Install.groupproj Delphi XE3 : DXe3Install.groupproj C++ Builder 2006 : CB2006Install.bdsgroup C++ Builder 2007 : CB2007Install.groupproj C++ Builder 2009 : CB2009Install.groupproj C++ Builder 2010 : CB2010Install.groupproj C++ Builder XE : CBXeInstall.groupproj C++ Builder XE2 : CBXe2Install.groupproj C++ Builder XE3 : CBXe3Install.groupproj 1 - Do a File/Open Project, navigate to the Install directory, select the correct file and open it. The project manager view should now display two package projects, one run-time and one design-time package. The run-time package name contains the Run suffix. The design-time package name contains the Design suffix. 2 - Select and Build the run-time package (do not install). 3 - Select and Install the design-time package. After a few seconds, you should have a dialog box telling you the package has been installed with a bunch of new components registered in the Tool Palette under Overbyte ICS and Overbyte ICS SSL. Then do a Save All and a Close All. {code} If you need ICS for FireMonkey get ICSv8 downloadable from: http://wiki.overbyte.be/wiki/index.php/ICS_Download and you must install DXe2InstallVclFmx.groupproj instead. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] UDP Problem
I am having a problem with OverbyteIcsUdpSend. On compilation I get a message Field MainForm.Wsocket does not have a corresponding component. Remove the declaration? I say No, but then get an access violation at 0x00544c24 when it tries to set Wsocket. I've tried both the XE2 and XE3 versions. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP Problem
Jack Moran wrote: I am having a problem with OverbyteIcsUdpSend. On compilation I get a message Field MainForm.Wsocket does not have a corresponding component. Remove the declaration? I say No, but then get an access violation at 0x00544c24 when it tries to set Wsocket. I've tried both the XE2 and XE3 versions. Sounds like ICS is not installed in the IDE. What version of ICS and Delphi do you use? -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP Problem
That's probably my problem. How do I install ICS? I'm just adding files to the project. I'm using Delphi XE2 and ICS Gold. On Jan 7, 2013, at 11:42 AM, Arno Garrels arno.garr...@gmx.de wrote: Jack Moran wrote: I am having a problem with OverbyteIcsUdpSend. On compilation I get a message Field MainForm.Wsocket does not have a corresponding component. Remove the declaration? I say No, but then get an access violation at 0x00544c24 when it tries to set Wsocket. I've tried both the XE2 and XE3 versions. Sounds like ICS is not installed in the IDE. What version of ICS and Delphi do you use? -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP Problem
Jack Moran wrote: That's probably my problem. How do I install ICS? I'm just adding files to the project. I'm using Delphi XE2 and ICS Gold. Quoted from ReadMe7.txt: {code} INSTALLATION USING THE INSTALL PROJECT GROUPS For each Delphi and C++ Builder version one project group is provided in directory .\Install: Delphi 7 : D7Install.bpg Delphi 2006 : D2006Install.bdsgroup Delphi 2007 : D2007Install.groupproj Delphi 2009 : D2009Install.groupproj Delphi 2010 : D2010Install.groupproj Delphi XE: DXeInstall.groupproj Delphi XE2 : DXe2Install.groupproj Delphi XE3 : DXe3Install.groupproj C++ Builder 2006 : CB2006Install.bdsgroup C++ Builder 2007 : CB2007Install.groupproj C++ Builder 2009 : CB2009Install.groupproj C++ Builder 2010 : CB2010Install.groupproj C++ Builder XE : CBXeInstall.groupproj C++ Builder XE2 : CBXe2Install.groupproj C++ Builder XE3 : CBXe3Install.groupproj 1 - Do a File/Open Project, navigate to the Install directory, select the correct file and open it. The project manager view should now display two package projects, one run-time and one design-time package. The run-time package name contains the Run suffix. The design-time package name contains the Design suffix. 2 - Select and Build the run-time package (do not install). 3 - Select and Install the design-time package. After a few seconds, you should have a dialog box telling you the package has been installed with a bunch of new components registered in the Tool Palette under Overbyte ICS and Overbyte ICS SSL. Then do a Save All and a Close All. {code} If you need ICS for FireMonkey get ICSv8 downloadable from: http://wiki.overbyte.be/wiki/index.php/ICS_Download and you must install DXe2InstallVclFmx.groupproj instead. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP Problem
Thanks, Arno. I completely missed the read me file. It's working fine now. I appreciate the excellent support. On Jan 7, 2013, at 12:17 PM, Arno Garrels arno.garr...@gmx.de wrote: Jack Moran wrote: That's probably my problem. How do I install ICS? I'm just adding files to the project. I'm using Delphi XE2 and ICS Gold. Quoted from ReadMe7.txt: {code} INSTALLATION USING THE INSTALL PROJECT GROUPS For each Delphi and C++ Builder version one project group is provided in directory .\Install: Delphi 7 : D7Install.bpg Delphi 2006 : D2006Install.bdsgroup Delphi 2007 : D2007Install.groupproj Delphi 2009 : D2009Install.groupproj Delphi 2010 : D2010Install.groupproj Delphi XE: DXeInstall.groupproj Delphi XE2 : DXe2Install.groupproj Delphi XE3 : DXe3Install.groupproj C++ Builder 2006 : CB2006Install.bdsgroup C++ Builder 2007 : CB2007Install.groupproj C++ Builder 2009 : CB2009Install.groupproj C++ Builder 2010 : CB2010Install.groupproj C++ Builder XE : CBXeInstall.groupproj C++ Builder XE2 : CBXe2Install.groupproj C++ Builder XE3 : CBXe3Install.groupproj 1 - Do a File/Open Project, navigate to the Install directory, select the correct file and open it. The project manager view should now display two package projects, one run-time and one design-time package. The run-time package name contains the Run suffix. The design-time package name contains the Design suffix. 2 - Select and Build the run-time package (do not install). 3 - Select and Install the design-time package. After a few seconds, you should have a dialog box telling you the package has been installed with a bunch of new components registered in the Tool Palette under Overbyte ICS and Overbyte ICS SSL. Then do a Save All and a Close All. {code} If you need ICS for FireMonkey get ICSv8 downloadable from: http://wiki.overbyte.be/wiki/index.php/ICS_Download and you must install DXe2InstallVclFmx.groupproj instead. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP problem
Hello Skok, I don't really know what the problem is but I think you do something too complicated... A simple .Send to 255.255.255.255 is enought, then OnDataSent do a .Close why use a TTimer ? ST I'm trying to create application that would run on multiple machines. ST This application has to know IP addresses of all other machines running ST same software. ST I'm trying to do something like discovery on network. Protocol I decided ST to use for discovery is UDP. On mailing list I already saw, that only ST one TWSocket component ST can be used for receiving and sending data. So, I wrote following code ST for listening: ST UDPSocket.Proto :='udp'; ST UDPSocket.Addr :='0.0.0.0'; ST UDPSocket.Port :='1234'; ST UDPSocket.Listen; ST Timer1.Enabled :=True; ST and on timer event there is code for sending broadcast data to notofy ST others about existence: ST procedure TForm1.Timer1Timer(Sender: TObject); ST var ST SendTo:TSockAddrIn; ST LenSendTo:integer; ST Data:string; ST begin ST LenSendTo:=SizeOf(SendTo); ST Data:='Test'+#0; ST SendTo.sin_port :=htons(1234); ST SendTo.sin_addr :=StrToInAddr('255.255.255.255'); ST SendTo.sin_family :=AF_INET; ST UDPSocket.SendTo(SendTo,LenSendTo,@Data[1],Length(Data)); ST end; ST StrToInAddr is function that I found in mailing list. ST On receive even I have code from udplistener sample: ST var ST Buffer : array [0..1023] of char; ST Len: Integer; ST Src: TSockAddrIn; ST SrcLen : Integer; ST begin ST SrcLen := SizeOf(Src); ST Len:= WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); ST if Len = 0 then begin ST Buffer[Len] := #0; ST listbox1.Items.Add(StrPas(Buffer)); ST end; ST end; ST Problem is that sending is ok (no error), but ondataavaliable event ST never gets fired, so I'm assuming that nothing is sent. ST What am I doing wrong. ST P.S. I have been using ICS for awhile now and I think that this is most ST stable component suite for networking. Keep the good work. ST Regards, ST Skok Tone -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDP problem
Well, I'm trying to do server and client UDP with one component. So, if I want do receive udp packet from network, I have to do Listen on some port, and if I want to send UDP packets, I hava to do Send. But since component is already listening, I can send only with SendTo. And this sendto must be broadcast. I'm tyring to combine udplistener and udpsender demos into one component. Timer is used to notify other machines (same application) in intervals thar sender is still alive. I'm not trying to do server-client communication. I'm trying to do standalone application that would know abount others (same application) over udp. Dod wrote: Hello Skok, I don't really know what the problem is but I think you do something too complicated... A simple .Send to 255.255.255.255 is enought, then OnDataSent do a .Close why use a TTimer ? ST I'm trying to create application that would run on multiple machines. ST This application has to know IP addresses of all other machines running ST same software. ST I'm trying to do something like discovery on network. Protocol I decided ST to use for discovery is UDP. On mailing list I already saw, that only ST one TWSocket component ST can be used for receiving and sending data. So, I wrote following code ST for listening: ST UDPSocket.Proto :='udp'; ST UDPSocket.Addr :='0.0.0.0'; ST UDPSocket.Port :='1234'; ST UDPSocket.Listen; ST Timer1.Enabled :=True; ST and on timer event there is code for sending broadcast data to notofy ST others about existence: ST procedure TForm1.Timer1Timer(Sender: TObject); ST var ST SendTo:TSockAddrIn; ST LenSendTo:integer; ST Data:string; ST begin ST LenSendTo:=SizeOf(SendTo); ST Data:='Test'+#0; ST SendTo.sin_port :=htons(1234); ST SendTo.sin_addr :=StrToInAddr('255.255.255.255'); ST SendTo.sin_family :=AF_INET; ST UDPSocket.SendTo(SendTo,LenSendTo,@Data[1],Length(Data)); ST end; ST StrToInAddr is function that I found in mailing list. ST On receive even I have code from udplistener sample: ST var ST Buffer : array [0..1023] of char; ST Len: Integer; ST Src: TSockAddrIn; ST SrcLen : Integer; ST begin ST SrcLen := SizeOf(Src); ST Len:= WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); ST if Len = 0 then begin ST Buffer[Len] := #0; ST listbox1.Items.Add(StrPas(Buffer)); ST end; ST end; ST Problem is that sending is ok (no error), but ondataavaliable event ST never gets fired, so I'm assuming that nothing is sent. ST What am I doing wrong. ST P.S. I have been using ICS for awhile now and I think that this is most ST stable component suite for networking. Keep the good work. ST Regards, ST Skok Tone -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] UDP problem
Hello all, I'm trying to create application that would run on multiple machines. This application has to know IP addresses of all other machines running same software. I'm trying to do something like discovery on network. Protocol I decided to use for discovery is UDP. On mailing list I already saw, that only one TWSocket component can be used for receiving and sending data. So, I wrote following code for listening: UDPSocket.Proto :='udp'; UDPSocket.Addr :='0.0.0.0'; UDPSocket.Port :='1234'; UDPSocket.Listen; Timer1.Enabled :=True; and on timer event there is code for sending broadcast data to notofy others about existence: procedure TForm1.Timer1Timer(Sender: TObject); var SendTo:TSockAddrIn; LenSendTo:integer; Data:string; begin LenSendTo:=SizeOf(SendTo); Data:='Test'+#0; SendTo.sin_port :=htons(1234); SendTo.sin_addr :=StrToInAddr('255.255.255.255'); SendTo.sin_family :=AF_INET; UDPSocket.SendTo(SendTo,LenSendTo,@Data[1],Length(Data)); end; StrToInAddr is function that I found in mailing list. On receive even I have code from udplistener sample: var Buffer : array [0..1023] of char; Len: Integer; Src: TSockAddrIn; SrcLen : Integer; begin SrcLen := SizeOf(Src); Len:= WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); if Len = 0 then begin Buffer[Len] := #0; listbox1.Items.Add(StrPas(Buffer)); end; end; Problem is that sending is ok (no error), but ondataavaliable event never gets fired, so I'm assuming that nothing is sent. What am I doing wrong. P.S. I have been using ICS for awhile now and I think that this is most stable component suite for networking. Keep the good work. Regards, Skok Tone -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be