P2P NAT Sample

Overview of the P2P NAT Sample

P2PSample_01.png

The P2P NAT sample demonstrates Peer-To-Peer communication between users using NAT-traversal via the P2P Interface. To help determine if the user can easily connect to peers, the P2P Interface can query the local user's NAT Type in relation to the internet, the sample shows this status for the logged in user.

Before You Begin

The sample application uses Epic Account Services to authenticate the local user for demonstration purposes. This requires that the Client Credentials used to initialize the SDK have been assigned to an Application used for Epic Account Services.

The demonstrated SDK functionality can be used with any of the supported identity providers for user authentication.

NAT Status

After logging in you will see one of the following NAT Status states shown:

NAT Status

Image

Description

Unknown

P2PNATStatus_Unknown.png

NAT type either unknown (remote) or we are unable to determine it (local).

Open

P2PNATStatus_Open.png

All peers can directly-connect to you.

Moderate

P2PNATStatus_Moderate.png

You can directly-connect to other Moderate and Open peers.

Strict

P2PNATStatus_Strict.png

You can only directly-connect to Open peers.

Chat

To illustrate communication between users there is a basic chat system included with this sample to allow you to attempt to send and receive messages between users. To attempt to initiate a chat with a friend, click on the "CHAT" button next to their name in the friends section as shown below:

P2PSample_Chat.png

To chat click on the chat box (above the console) and type a message then hit ENTER to send the chat message as shown below:

P2PSample_Chat_2.png

The messages sent by you and received from friends will appear in the box in the top-left as shown below:

P2PSample_Chat_3.png

To close the current chat session, click on the "CLOSE CHAT" button.

Documentation

To find out more information about NAT Traversal and P2P communication click on the "DOCUMENTATION" button, a new web browser link will open. You may also refer to the P2P Interface page.