bloder
02/22/2018, 7:31 PMtry {
clientSocket = DatagramSocket()
val ipAdresses = InetAddress.getByName(getBroadcast())
val sendData = ByteArray(1024)
clientSocket?.send(DatagramPacket(sendData, sendData.size, ipAdresses, dstPort))
clientSocket?.close()
} catch (e: Exception) {
if (clientSocket != null) clientSocket?.close()
}
I've already check this ipAddresses and it's correct for linux and windows and it doesn't generate any exception =/