Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INdy comps

Status
Not open for further replies.

sggaunt

Programmer
Jul 4, 2001
8,620
GB
Iv'e never done anything with Sockets or anything using
Indy style components. so I am a complete newbies from that point of view.

(same goes for putting these this type of component in a DLL but thats
for another thread!)

Sorry but these may seem an easy question but I hope someone can help

I have been experimenting with the Indy 9 demo projects for the Client
and Server components and managed to get them working when run on the
same PC.
Here are the settings I used
Client Port 47110 (the default in the project)
Bound IP is blank
Bound Port = 0

Server Host set to localhost (as you might expect)

But I have been unable to get any communications when the server is
installed on another machine on our network.
Can anyone give me some idea on how to set the Host/Port settings to
achieve communications targeted at a specific IP address.


Steve


Steve [The sane]: Delphi a feersum engin indeed.
 
The server host cant be bound to 127.0.0.1, it has to be a public ip

[tt]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not underestimate the power of [!]Google[/!][/tt]
 
When its on a different Machine (Ip address)
I set the server host to that machines IP address e.g. 169.254.55.9: 8000

The client has bound IP and Port also Host and Port properties.
I am not sure I understand the diffrence, assume that Host & Port are the address of the local machine (where the client is running) 169.254.55.8
and the other (the Bound IP) is the remote machine I wish to talk to.
In this case 169.254.55.9. Tried this to no effect.




Steve [The sane]: Delphi a feersum engin indeed.
 
I have been looking at the Indy chat demo which uses the same comps, and that has given us a better idea about whats happening?
Here the server doesn't use the bindings at all except to set a port number.
So as far as I can see (someone tell me is this is 100%)

The clients Host property must be set to the target (server machines) IP address
The clients Port property must be set to the Server (wherever it is) Port value.

The Server only requires a Port to be set, which the clients/clients use to connect.

An Indy server component can reply to a client (but The normal Delphi TCPserver component [on the Internet tab] cannot) for our application the client will be a hardware/embedded device A PIC MCPU, so the server must be able to reply.

My college has got his demo PIC code talking to the Indy chat server demo. So far so good.











Steve [The sane]: Delphi a feersum engin indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top