Skip to content

Commit

Permalink
Use address instead of host name
Browse files Browse the repository at this point in the history
  • Loading branch information
DomiR committed Nov 18, 2019
1 parent dd8b47b commit d9f1ffc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected Void doInBackground(Pair<DatagramSocket, UdpReceiverTask.OnDataReceive
final InetAddress address = packet.getAddress();
final String base64Data = Base64.encodeToString(packet.getData(), packet.getOffset(),
packet.getLength(), Base64.NO_WRAP);
receiverListener.didReceiveData(base64Data, address.getHostName(), packet.getPort());
receiverListener.didReceiveData(base64Data, address.getHostAddress(), packet.getPort());
} catch (IOException ioe) {
if (receiverListener != null) {
receiverListener.didReceiveError(ioe.getMessage());
Expand Down

0 comments on commit d9f1ffc

Please sign in to comment.