Socket.peer().host.ip problem

It is giving 127.0.0.1 when i connect from external ip. I must send datagram packets to client’s IP addresses but how?

//s = Socket
//u = UdpSocket
//sendBuffer = Buffer
address = new Address();
address.host = cast(s, Socket).peer().host.ip;
trace("address.host="+cast(s, Socket).peer().host.host);//127.0.0.1 if i tried to connect from another ip(it is giving local ip like 192.168.1.2 if i connected from same network).
address.port = cast(s, Socket).host().port;
sendBuffer = Bytes.ofString("OpenFL");
u.sendTo(sendBuffer, 0, sendBuffer.length, address);

Looks like something in the Haxe core, like around here?

I guess i am on wrong way. Is there anybody who send a datagram packet to an external ip?