Board index » delphi » Indy 9.0 - Simple Problem

Indy 9.0 - Simple Problem

I want to connect one computer to another and basically "chat" with that
computer. I think I would use TCP to do this, but I am not sure how I would
go about doing this. Can someone give me a real bare-bones example of
connecting, sending, and recieving messages? Or at least show me where to
find examples?
 

Re:Indy 9.0 - Simple Problem


Quote
"Anthony T.W." <seiri...@hotmail.com> wrote:
>I want to connect one computer to another and basically "chat" with that
>computer. I think I would use TCP to do this, but I am not sure how I would
>go about doing this. Can someone give me a real bare-bones example of
>connecting, sending, and recieving messages? Or at least show me where to
>find examples?

if u want use Indy, u can download the indy demo from indy homepage.
i don't sure .. but try to find in www.indyproject.org

there are some sample with indy.

Chiao ..Willy chandra

Re:Indy 9.0 - Simple Problem


All their examples have to do with using a server and connecting to that. I
just want to connect two PCs, no more. Isn't there an easier way than making
one a server?
--

Anthony T.W. (aka Anomy)
RPG Infinity Webmaster
(http://www.rpginfinity.com)

Quote
"willy chandra" <willy.chan...@web.de> wrote in message

news:3e303df1$1@newsgroups.borland.com...
Quote

> "Anthony T.W." <seiri...@hotmail.com> wrote:
> >I want to connect one computer to another and basically "chat" with that
> >computer. I think I would use TCP to do this, but I am not sure how I
would
> >go about doing this. Can someone give me a real bare-bones example of
> >connecting, sending, and recieving messages? Or at least show me where to
> >find examples?

> if u want use Indy, u can download the indy demo from indy homepage.
> i don't sure .. but try to find in www.indyproject.org

> there are some sample with indy.

> Chiao ..Willy chandra

Re:Indy 9.0 - Simple Problem


Quote
Anthony T.W. <seiri...@hotmail.com> wrote in message

news:3e30591c$1@newsgroups.borland.com...

Quote
> All their examples have to do with using a server and connecting to
that. I
> just want to connect two PCs, no more. Isn't there an easier way
than making
> one a server?
> --

Not with TCP.  You can use UDP to send/rx datagrams - this protocol
is message-based rather than streaming & does not have a
client<>server relationship, just a socket at each end.  It's lighter
& quicker than TCP but has no windowed flow-control or error
correction, (rarely a problem on a LAN).

Rgds,
Martin

Re:Indy 9.0 - Simple Problem


In article <3e309...@newsgroups.borland.com>, seiri...@hotmail.com
says...

Quote
> What are diagrams?

Datagrams as User Datagram Protocol.

From
(http://java.sun.com/docs/books/tutorial/networking/datagrams/definition
.html):
A datagram is an independent, self-contained message sent over the
network whose arrival, arrival time, and content are not guaranteed.

Examples of a datagram client is:

IdTimeUDP.pas

and an example of a server is:

IdTimeUDPServer.pas

Quote
>How would I go about using UDP to do this?

Please see the files listed above.  Some things to note about datagrams
are these:

1) There is no such thing as a descret connection with UDP.
2) You have to have a mechanism for ensuring ensuring reliability or you
must be willing to accept some data loss.  Datagrams may not arrive in a
specific order.

and

3) A datagram should probably be no more than 548 bytes unless you know
that all networks and routers the packet will go through can handle much
more.  The 548 value was taken from a FAQ at http://www.manualy.sk/sock-
faq/unix-socket-faq-5.html which is good reading anyway.

HTH.
--
J. Peter Mugaas - Chairperson, Distribution Team, Indy Pit Crew
Internet Direct (Indy) Website - http://www.nevrona.com/Indy
Personal Home Page - http://www.wvnet.edu/~oma00215
If I want to do business with you, I will contact you.  Otherwise, do
not contact me.

Re:Indy 9.0 - Simple Problem


Quote
"Anthony T.W." <seiri...@hotmail.com> wrote in message

news:3e30591c$1@newsgroups.borland.com...

Quote
> All their examples have to do with using a server and connecting to that.
I
> just want to connect two PCs, no more. Isn't there an easier way than
making
> one a server?

If its only 2 clients you could use TIdSimpleServer and connect to that but
its just as easy to use a normal server.  Every TCP connection needs a
server (a listening socket) but this does not necessarily mean it serves
many clients.

Dan

Other Threads