Quantcast
Channel: Photon Server — Photon Engine
Viewing all articles
Browse latest Browse all 1557

After enabling encryption server disconnects client after OpCustom

$
0
0
Hi,

I tried to get encryption up and running but after doing the initial setup the server disconnects the client on OpCustom.

Client-Code:

PhotonListener listener = new PhotonListener {Main = this};
Peer = new PhotonPeer(listener, ConnectionProtocol.Udp) {ChannelCount = 10};


and

public void OnStatusChanged(StatusCode statusCode)
{
Main.Dispatcher.Invoke(() =>
{
Main.StatusTextBox.AppendText(DateTime.Now.ToString("yy-mm-dd hh.mm.ss.ffffff") +
" - OnStatusChanged called with: " + statusCode + "\n");
Main.StatusTextBox.ScrollToEnd();
if (statusCode == StatusCode.Connect)
{
Main.Disconnect_Button.IsEnabled = true;
Main.PeerConnected = true;
Main.Peer.EstablishEncryption();
}
else
{
Main.Disconnect_Button.IsEnabled = false;
Main.Connect_Button.IsEnabled = true;
Main.StatusIndicator.Fill = new SolidColorBrush(Colors.Red);
Main.PeerConnecting = false;
Main.PeerConnected = false;
Main.DispatcherTimer.Stop();
}
});
}


Server side there is no further action taken.

On client I get this:

16-32-18 11.32.04.005023 - Trying to connect to 127.0.0.1 on default port 5055...
16-32-18 11.32.04.021023 - Connection initialization in progress...
16-32-18 11.32.07.096023 - OnStatusChanged called with: Connect
16-32-18 11.32.08.130023 - OnStatusChanged called with: EncryptionEstablished


On server side I get:

2016-04-18 11:32:06,048 [ 16] DEBUG [ ApplicationBase][ 792] [(null)] - OnInit - ConnID=2, data=(41 bytes) F3-00-01-06-01-03-00-01-07-4D-61-73-74-65-72-53-65-72-76-65-72-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
2016-04-18 11:32:06,074 [ 16] DEBUG [ ApplicationBase][ 799] [(null)] - OnInit - ConnID=2, IP 127.0.0.1 on port 5055, type = ENetListener
2016-04-18 11:32:06,077 [ 16] DEBUG [ Protocol][ 355] [(null)] - Parsed init message for application MasterServer, client version 3.0.1, protocol GpBinaryV2 version 1.6
2016-04-18 11:32:06,080 [ 17] INFO [ ServerApplication][ 67] [(null)] - Received init request (local: 127.0.0.1:5055, remote: 127.0.0.1:53477, connection: 2, protocol: GpBinaryV162, type= ENetPeer)
2016-04-18 11:32:06,084 [ 17] INFO [ ClientPeerFactory][ 112] [(null)] - Received init request on port 5055 - trying to create a new client peer
2016-04-18 11:32:06,089 [ 17] INFO [ ClientPeerFactory][ 115] [(null)] - About to create a new client peer (local: 127.0.0.1:5055, remote: 127.0.0.1:53477, connection: 2, protocol: GpBinaryV162, type= ENetPeer)
2016-04-18 11:32:06,179 [ 17] DEBUG [ ApplicationBase][ 1302] [(null)] - OnInit - response sent to ConnId 2 with SendResult Ok
2016-04-18 11:32:06,182 [ 17] DEBUG [ ApplicationBase][ 1304] [(null)] - OnInit - ConnID=2, send data=(3 bytes) F3-01-00
2016-04-18 11:32:07,114 [ 16] DEBUG [ ApplicationBase][ 1015] [(null)] - OnReceive - ConnID=2, data=(107 bytes) F3-06-00-00-01-01-78-00-00-00-60-B3-EF-B6-0E-EB-61-6C-7E-AE-EC-5A-50-9F-54-A6-44-68-17-27-71-5B-C7-9A-BD-83-11-A8-D8-72-4B-28-AE-B9-E3-21-C9-11-A1-6E-06-6D-8D-64-1D-74-19-F6-C8-80-AE-DD-80-73-53-86-4C-E0-59-A0-C4-09-DB-56-68-12-CA-4F-0E-FA-B0-0A-CA-CB-52-AD-48-F4-98-43-92-18-01-8B-2B-4D-29-DA-35-79-A6-5E-36-E5-F2-E2-25
2016-04-18 11:32:07,132 [ 12] DEBUG [ PeerBase][ 462] [(null)] - InitializeEncryption: conId=2, HashMode=SHA256, Paddin=PKCS7
2016-04-18 11:32:07,135 [ 12] DEBUG [ PeerBase][ 1109] [(null)] - SentOpResponse: ConnID=2, opCode=0, return=0, ChannelId=0, result=Ok, data=(110 bytes) F3-07-00-00-00-2A-00-01-01-78-00-00-00-60-D3-5B-D0-7A-18-23-06-86-9D-DC-AC-75-46-2B-E1-7F-B1-66-AC-03-D0-8B-1A-27-BA-52-E7-F9-1A-6B-39-5B-6A-D6-71-39-DD-05-9F-8E-A2-92-D5-35-6C-0C-8C-58-87-27-E5-04-67-0E-E6-53-AF-68-43-3F-66-03-41-6D-6A-94-DC-9E-47-30-89-70-8B-6F-83-AF-91-90-F0-05-AC-75-8B-B7-11-DA-60-3A-88-A1-EF-5B-B1-66-BF-65
2016-04-18 11:32:37,965 [ 16] DEBUG [ ApplicationBase][ 700] [(null)] - OnDisconnect - ConnID=2
2016-04-18 11:32:37,985 [ 8] DEBUG [ PeerBase][ 834] [(null)] - Peer 2 changed state from Connected to Disconnected
2016-04-18 11:32:37,990 [ 8] INFO [ ClientPeer][ 277] [(null)] - Disconnecting client f773278e-d723-4454-8791-a29a5b0b705f form server f773278e-d723-4454-8791-a29a5b0b705f (Guid: MasterServer)
2016-04-18 11:32:38,230 [ 8] INFO [ ClientPeer][ 127] [(null)] - Disconnected client peer with Guid = f773278e-d723-4454-8791-a29a5b0b705f requested by server MasterServer
2016-04-18 11:32:38,254 [ 8] DEBUG [ PeerBase][ 834] [(null)] - Peer 2 changed state from Disconnected to Disposed


The client freezes after the OpCustom that never gets to the server.

What am I doing wrong here?

Viewing all articles
Browse latest Browse all 1557

Trending Articles