Handle sendPacket

Hi everyone…

How to handle packet that failed to send because of no internet connection??

any suggestion??

assumed that i already have a code like :

clientConnection.getConnection().sendPacket(msg);

the code above is use to sentpacket(Chatting) to person.but how to handle if the packet failed to send? thanks for advices