Is it possible to connect to remote host with indy client and send data to the local server.
i try something like this and i don’t receive anything:
Server:=TIdUDPServer.Create;
Server.OnUDPException:=UDPException;
Server.OnUDPRead:=UDPRead;
Server.Bindings.Add.Port:=10;
Server.Active:=true;
//Server is listening to local IP
Client:=TIdUDPClient.Create;
with Client do begin
Host:= '130.204.159.205'; //My IP
Port:=10;
Send('Hello');
end;
My goal is to create client/server applications that will communicate with UDP over internet
UDP is a connectionless transport. It does not guarantee data deliver like TCP does, especially over a large network like the Internet. If
TIdUDPServeris not receiving data, then either the packets are not reaching the machine to begin with, or are being blocked beforeTIdDUPServercan see them. Use a packet sniffer, such as Wireshark, to verify that the packets are reaching the NIC(s) thatTIdUDPServeris listening on. If they are not, then you have a networking issue. If they are, then you have an OS issue.