PDA

View Full Version : Indy 10 ;/ Complete lack of demos and DOC



arthurprs
02-09-2007, 06:45 PM
I simply don't know how make this lib work... :P

I download the demos but nothing about TCP or UDP protocols

-> Same thing with synapse, nothing about TCP or UDP =(

someone can help me with a demo ?

Traveler
02-09-2007, 07:28 PM
I've looked into Indy 10 too, a couple months ago. I figured that the latest version was probably the best to start out with. Unfortunately, like you, I had major difficulties understanding the whole thing. Only a few demos and little to no tutorials at all.
That why I turned back to 9, which does tend to have more demos and tutorials, to get you on your way.

Back then I did manage to complete the thing I wanted to create. But in all, the Indy experience wasn't as great as I had hoped it would be.

Brainer
02-09-2007, 08:57 PM
Indy10 is not that hard in use. The things gets complicated when it comes to sending data. Indy10 has a shitty data type called TBytes, which is an array consists of bytes. I've figured out how to convert records and variables into TBytes, but no idea how to do it with TStream :roll: Unfortunately, you can't send any other data than TBytes with Indy10. :cry:

Therefore I prefer to switch back to Indy9 or to use ICS.

technomage
02-09-2007, 08:58 PM
You can get an ebook on Indy 10, you can buy it here (http://www.atozed.com/indy/Book/index.EN.aspx) it's very good :)

arthurprs
02-09-2007, 09:13 PM
I will try indy9

What about synapse someone have some demo ?

Robert Kosek
02-09-2007, 11:42 PM
Indy10 is not that hard in use. The things gets complicated when it comes to sending data. Indy10 has a shitty data type called TBytes, which is an array consists of bytes. I've figured out how to convert records and variables into TBytes, but no idea how to do it with TStream :roll: Unfortunately, you can't send any other data than TBytes with Indy10. :cry:

Therefore I prefer to switch back to Indy9 or to use ICS.
var
bytes: TBytes;
begin
SetLength(bytes, stream.Length);
Stream.Read(bytes, stream.Length);
end;It really isn't a complex thing. If you want to know these things try working with streams and archivers. You'll learn fast.

Setharian
03-09-2007, 05:44 AM
It's not hard but inconvenient. What if the TStream is a TFileStream with a 100 MB file opened? Will you allocate 100 MB of memory, copy it all there and send all data at once? Probably not. They should have included a function which will automaticly send a TStream's content by chunks (you can always write such a function yourself though).

As a side note, the code you have posted is wrong. It should be like this:

var
bytes: TBytes;
begin
SetLength(bytes, stream.Length);
Stream.Read(bytes[0], stream.Length);
end;

NecroDOME
03-09-2007, 06:27 PM
You may also try ICS (internet component suite)

http://www.overbyte.be/frame_index.html
Its a bit easier to understand.

Robert Kosek
03-09-2007, 06:48 PM
As a side note, the code you have posted is wrong.It was off the top of my head so I'm glad that was it.

arthurprs
06-09-2007, 11:32 PM
i can't make sinapse work ;/
.....

indy9 are working, but im having problem with threads now

marcov
28-10-2007, 01:37 PM
Therefore I prefer to switch back to Indy9 or to use ICS.

Keep in mind that those are limited to Windows (and linux/x86 at best if you are desperate).

For something portable you need lnet/indy10/synapze

Brainer
28-10-2007, 02:04 PM
I didn't know Indy10 works on Linux. :shock:

marcov
30-12-2007, 09:12 PM
I didn't know Indy10 works on Linux. :shock:

It works on OS X, FreeBSD and WinCE too.

phibermon
20-12-2009, 05:49 PM
Reliable, in order UDP packets? with error correction? that's a great idea! lets do it!! oh wait...

no sorry sorry, my bad, just checked up on TCP. turns out it does that already *sigh*

nah seriously, there are advantages in terms of the routing of UDP packets and when dealing with a high volume of connections but using both TCP and UDP at the same time would give you far less headaches, send player movements and the such over UDP and reliable stuff over TCP. World of warcraft only uses TCP suprisingly and City of heros uses the tcp/udp hybrid method.

yakk
20-05-2010, 08:23 PM
Using TCP and UDP together is fine as long as you bear in mind that a TCP send is greedy. More common is to simulate the favourable properties of TCP so as to keep control over bandwidth.

noeska
21-05-2010, 06:11 PM
Currently i am using indy10 with freepascal un linux creating an webserver that can can server pages/files using remobjects pascalscript and sqlite.

Indy 10 for freepascal: http://www.indyproject.org/sockets/fpc/index.en.aspx
Documentation: http://www.indyproject.org/Sockets/Docs/index.EN.aspx do check out the online documenation.

Demos:
http://www.indyproject.org/Sockets/Demos/index.EN.aspx

More Demos:
http://www.atozed.com/indy/demos/10/index.EN.aspx

Regarding your using tcp-server/client with tstreams see this post:
http://borland.newsgroups.archived.at/public.delphi.internet.winsock/200502/050206552.html (no need to use tbytes directly)