IP и Порт в Photon Server

IP и Порт в Photon Server

Сообщение skeletarik 07 май 2012, 18:39

При запуске примера Bootcamp (обновили демку), надо указывать Custom Server Address. Так вот, это я, как понимаю, мой ip и порт. Зашёл на 2ip.ru, узнал свой ip. А дальше ступор. Какой порт указывать?? Нашёл в логах Photon Server'а, вот логи:
Синтаксис:
Используется csharp
3244: 13:29:14.048 - ---
3244: 13:29:14.048 - Service: "Photon Socket Server" starting
3244: 13:29:14.048 - Config File: C:\Users\VAIO\Documents\New Unity Project 7\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\bin_Win64\PhotonServer.config
3244: 13:29:14.049 - Will produce at most: 10 crash dumps
3244: 13:29:14.050 - Server Starting...
3244: 13:29:14.056 -    Tick count: 10993889 (wraps in: 49.583 days)
3244: 13:29:14.056 - Tick count 64: 10993889
3244: 13:29:14.070 - Photon Version: 3.0.15.1343
3244: 13:29:14.070 - PID: 612
3244: 13:29:14.070 - Config File: C:\Users\VAIO\Documents\New Unity Project 7\ExitGames-Photon-Server-SDK_v3-0-24-3243-RC9\deploy\bin_Win64\PhotonServer.config
3244: 13:29:14.089 - Not using performance counters as they are not currently installed. Run the service with /InstallCounters to install them.
3244: 13:29:14.092 - Max message size: 512000
3244: 13:29:14.098 - S2S: MaxInboundMessageSize: 512000
3244: 13:29:14.098 - S2S: MaxOutboundMessageSize: 512000
3244: 13:29:14.098 - S2S: No inactivity timeout
3244: 13:29:14.122 - Max Reliable Data In Transit (awaiting ACKs) per peer : 51200 bytes
3244: 13:29:14.122 - Per peer bandwidth limit
3244: 13:29:14.122 - Transmit Rate Limit: 256 KB/Sec
3244: 13:29:14.122 - Limit period: 200ms
3244: 13:29:14.122 - Limit per period: 52428 bytes
3244: 13:29:14.122 - Max queued data for transmission per peer: 512000 bytes
3244: 13:29:14.122 - Minimum retransmit timeout: 200
3244: 13:29:14.122 - Minimum ENet timeout: 5000ms
3244: 13:29:14.122 - Maximum ENet timeout: 30000ms
3244: 13:29:14.123 - Outbound ENet: MaxInboundMessageSize: 512000
3244: 13:29:14.123 - Outbound ENet: MaxOutboundMessageSize: 512000
3244: 13:29:14.189 - About to load runtime: PhotonHostRuntime.PhotonDomainManager from PhotonHostRuntime, Culture=neutral, PublicKeyToken=02C301B61B060C4D
3244: 13:29:14.189 - Optimising event broadcast for 20 or more peers
3244: 13:29:14.195 - About to load CLR - versions available:
3244: 13:29:14.195 - v2.0.50727
3244: 13:29:14.195 - v4.0.30319
3244: 13:29:14.195 - No preference in configuration file, will load latest.
3244: 13:29:14.195 - About to load version: "v4.0.30319"
3244: 13:29:14.413 - Loaded version: "v4.0.30319"
3244: 13:29:28.243 - Photon host runtime loaded
3244: 13:29:42.032 - License is valid.
3244: 13:29:42.032 - Licensed for 100 concurrent connections.
3244: 13:29:42.032 - Max Reliable Data In Transit (awaiting ACKs) per peer : 51200 bytes
3244: 13:29:42.032 - Per peer bandwidth limit
3244: 13:29:42.032 - Transmit Rate Limit: 256 KB/Sec
3244: 13:29:42.032 - Limit period: 200ms
3244: 13:29:42.032 - Limit per period: 52428 bytes
3244: 13:29:42.032 - Max queued data for transmission per peer: 512000 bytes
3244: 13:29:42.032 - Minimum retransmit timeout: 200
3244: 13:29:42.032 - Minimum ENet timeout: 5000ms
3244: 13:29:42.032 - Maximum ENet timeout: 30000ms
3244: 13:29:42.032 - CENetHost: Using Timer Wheel
3244: 13:29:42.032 - About to load application: Master from Photon.LoadBalancing
3244: 13:29:42.032 - Auto restart is enabled for application
3244: 13:29:42.032 - Application will restart 1000ms after the last change detected
3244: 13:29:42.032 - Application will restart if files matching the following are changed: "dll;config"
3244: 13:29:42.032 - Application will NOT restart if files matching the following are changed: "log4net.config"
3244: 13:29:49.842 - Application: "Master" started in app domain: 2
3244: 13:29:49.842 - About to load application: Game1 from Photon.LoadBalancing
3244: 13:29:49.842 - Auto restart is enabled for application
3244: 13:29:49.842 - Application will restart 1000ms after the last change detected
3244: 13:29:49.842 - Application will restart if files matching the following are changed: "dll;config"
3244: 13:29:49.843 - Application will NOT restart if files matching the following are changed: "log4net.config"
3244: 13:29:56.666 - Application: "Game1" started in app domain: 3
3244: 13:29:56.666 - About to load application: Game2 from Photon.LoadBalancing
3244: 13:29:56.666 - Auto restart is enabled for application
3244: 13:29:56.666 - Application will restart 1000ms after the last change detected
3244: 13:29:56.666 - Application will restart if files matching the following are changed: "dll;config"
3244: 13:29:56.666 - Application will NOT restart if files matching the following are changed: "log4net.config"
3244: 13:30:03.346 - Application: "Game2" started in app domain: 4
3244: 13:30:03.346 - About to load application: Policy from Policy.Application
3244: 13:30:03.346 - Auto restart is enabled for application
3244: 13:30:03.346 - Application will restart 1000ms after the last change detected
3244: 13:30:03.346 - Application will restart if files matching the following are changed: "dll;config;xml"
3244: 13:30:03.346 - Application will NOT restart if files matching the following are changed: "log4net.config"
3244: 13:30:09.765 - Application: "Policy" started in app domain: 5
3244: 13:30:09.765 - About to load application: CounterPublisher from CounterPublisher
3244: 13:30:09.765 - Auto restart is enabled for application
3244: 13:30:09.765 - Application will restart 1000ms after the last change detected
3244: 13:30:09.765 - Application will restart if files matching the following are changed: "dll;config"
3244: 13:30:09.765 - Application will NOT restart if files matching the following are changed: "log4net.config"
3244: 13:30:16.362 - Application: "CounterPublisher" started in app domain: 6
3244: 13:30:16.362 - Adding TCP listener on :0.0.0.0: 4530 with a listen backlog of: 150
3244: 13:30:16.362 - TCP inactivity timeout: 5000ms
3244: 13:30:16.362 - MaxInboundMessageSize: 512000
3244: 13:30:16.362 - MaxOutboundMessageSize: 512000
3244: 13:30:16.362 - Forcing all applications ids to: "Master"
3244: 13:30:16.362 - Adding TCP listener on :0.0.0.0: 4531 with a listen backlog of: 150
3244: 13:30:16.362 - TCP inactivity timeout: 5000ms
3244: 13:30:16.362 - MaxInboundMessageSize: 512000
3244: 13:30:16.362 - MaxOutboundMessageSize: 512000
3244: 13:30:16.362 - Forcing all applications ids to: "Game1"
3244: 13:30:16.362 - Adding TCP listener on :0.0.0.0: 4532 with a listen backlog of: 150
3244: 13:30:16.362 - TCP inactivity timeout: 5000ms
3244: 13:30:16.362 - MaxInboundMessageSize: 512000
3244: 13:30:16.362 - MaxOutboundMessageSize: 512000
3244: 13:30:16.362 - Forcing all applications ids to: "Game2"
3244: 13:30:16.362 - Adding TCP listener on :0.0.0.0: 4520 with a listen backlog of: 150
3244: 13:30:16.362 - TCP inactivity timeout: 5000ms
3244: 13:30:16.362 - MaxInboundMessageSize: 512000
3244: 13:30:16.362 - MaxOutboundMessageSize: 512000
3244: 13:30:16.363 - Forcing all applications ids to: "Master"
3244: 13:30:16.363 - MaxInboundMessageSize: 512000
3244: 13:30:16.363 - MaxOutboundMessageSize: 512000
3244: 13:30:16.363 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
3244: 13:30:16.363 - Adding UDP listener on :188.133.141.44: 5055 with a listen backlog of: 500
3244: 13:30:16.363 - Adding UDP listener on :192.168.1.11: 5055 with a listen backlog of: 500
3244: 13:30:16.363 - Adding UDP listener on :127.0.0.1: 5055 with a listen backlog of: 500
3244: 13:30:16.363 - Forcing all applications ids to: "Game1"
3244: 13:30:16.363 - MaxInboundMessageSize: 512000
3244: 13:30:16.363 - MaxOutboundMessageSize: 512000
3244: 13:30:16.363 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
3244: 13:30:16.364 - Adding UDP listener on :188.133.141.44: 5056 with a listen backlog of: 500
3244: 13:30:16.364 - Adding UDP listener on :192.168.1.11: 5056 with a listen backlog of: 500
3244: 13:30:16.364 - Adding UDP listener on :127.0.0.1: 5056 with a listen backlog of: 500
3244: 13:30:16.364 - Forcing all applications ids to: "Game2"
3244: 13:30:16.364 - MaxInboundMessageSize: 512000
3244: 13:30:16.364 - MaxOutboundMessageSize: 512000
3244: 13:30:16.364 - UDP address specified as:0.0.0.0 adding listener to each available IPv4 address
3244: 13:30:16.364 - Adding UDP listener on :188.133.141.44: 5057 with a listen backlog of: 500
3244: 13:30:16.364 - Adding UDP listener on :192.168.1.11: 5057 with a listen backlog of: 500
3244: 13:30:16.364 - Adding UDP listener on :127.0.0.1: 5057 with a listen backlog of: 500
3244: 13:30:16.364 - Adding TCP Policy listener on :0.0.0.0: 843 with a listen backlog of: 150 and routing to application: "Policy"
3244: 13:30:16.364 - TCP inactivity timeout: 1000ms
3244: 13:30:16.412 - Service is running...

 
Порты у своего ip - 5055, 5056, 5057. Так вот, поставил порт 5055. Пишет при запуске - localhost. Остальные два порта - ошибка, которую хрен знает, как исправлять:
Синтаксис:
Используется csharp
NullReferenceException: Object reference not set to an instance of an object
ExitGames.Client.Photon.NConnect..ctor (ExitGames.Client.Photon.EnetPeer npeer, System.String ipPort)
ExitGames.Client.Photon.EnetPeer.Connect (System.String ipport, System.String appID, Byte nodeId)
ExitGames.Client.Photon.PhotonPeer.Connect (System.String serverAddress, System.String applicationName)
ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient.ConnectToGameServer () (at Assets/Photon/LoadbalancingAPI/LoadBalancingClient.cs:318)
ExitGames.Client.Photon.LoadBalancing.LoadBalancingClient.OnStatusChanged (StatusCode statusCode) (at Assets/Photon/LoadbalancingAPI/LoadBalancingClient.cs:808)
ExitGames.Client.Photon.EnetPeer.Disconnected ()
ExitGames.Client.Photon.NConnect.<Run>b__1 ()
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands ()
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands ()
ExitGames.Client.Photon.PhotonPeer.Service ()
Game.Update () (at Assets/Photon/Game.cs:59)
usePhoton.Update () (at Assets/Photon/usePhoton.cs:165)
 
Помогите, пожалуйста! Может я не те порты вставляю, или ip не тот (тогда какой другой - ума не приложу) или эту ошибку просто надо как-то исправить?
Аватара пользователя
skeletarik
UNец
 
Сообщения: 48
Зарегистрирован: 02 янв 2012, 20:57

Re: IP и Порт в Photon Server

Сообщение trololoid 07 май 2012, 19:40

Если на одной машинке заводишь сервер и клиента, то клиенту в качестве IP пишем localhost. Во всяком случае должен быть порт по дефолту.
Аватара пользователя
trololoid
Старожил
 
Сообщения: 712
Зарегистрирован: 15 сен 2011, 19:18
Откуда: Туапсе, Краснодарский край, Россия

Re: IP и Порт в Photon Server

Сообщение skeletarik 07 май 2012, 23:13

Всё, я разобрался: надо в двух файлах в GameServer1 и в GameServer2 прописать свой ip. Было бы здорово, если бы разработчики сразу писали это в документации, чтобы другие не лазили по множеству английских форумов ;)
Аватара пользователя
skeletarik
UNец
 
Сообщения: 48
Зарегистрирован: 02 янв 2012, 20:57


Вернуться в Photon

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2