Patent ID: 8667149

Claim:
A communication device for performing Peer-to-Peer (P2P) communication with another communication device by establishing a session with the other communication device through a server that performs transmitting and receiving of data, the communication device comprising: a processor; and memory storing computer-readable instructions that, when executed, cause the communication device to execute: first transmitting of a first response message to the other communication device through the server, in a case where the communication device is requested to establish the session by the other communication device, and upon the communication device receiving a session start message, the first response message including information on a first port for receiving, from the other communication device without the server, a control message for establishing the session, the control message including information necessary to perform P2P communication with the other communication device; establishing the session with the other communication device by transmitting the control message to a second port specified by information in one of the session start message and a second response message received from the other communication device through the server; and starting transmitting and receiving of media data to and from the other communication device after the session has been established.