Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Can I auto detect ServerToServer connection port

$
0
0
Hi I'm developing S2S Code, I know normal way to connect, like this

protected override PeerBase CreatePeer(InitRequest initRequest)
{
if (initRequest.LocalPort == 4520)
{
// for S2S connections
return new MyInboundPeer(initRequest);
}
}

but I wanna auto detect port number like this
if (this.ServerToServerPorts.contain( initRequest.LocalPort ))
{
// for S2S connections
return new MyInboundPeer(initRequest);
}

or

if (initRequest.IsS2SConnecttion)
{
// for S2S connections
return new MyInboundPeer(initRequest);
}

Can do that ?

Viewing all articles
Browse latest Browse all 15755

Trending Articles