Patent ID: 8583736

Claim:
A communication device comprising: a processor; and a memory configured to store computer-readable instructions, wherein execution of the computer-readable instructions cause the processor to perform processes comprising: opening a port that is to be used when peer to peer communication is performed with another communication device; transmitting, to the other communication device, a first request packet to which a port number of the port and additional information of the communication device are added, the first request packet being a packet requesting establishment of a communication path with the other communication device; determining, in a case where a response packet in response to the first request packet that has been transmitted is not received from the other communication device and a second request packet is received from the other communication device, whether to transmit a positive response packet to the other communication device, based on additional information added to the second request packet, the second request packet being a packet requesting establishment of a communication path with the communication device; transmitting the positive response packet to the other communication device in a case where it is determined that the positive response packet is to be transmitted; and closing the port in a case where, after the positive response packet has been transmitted, a positive response packet is received from the other communication device.