@@ -103,19 +103,19 @@ public class EOSTransport : NetworkTransport
103103 private Queue < Tuple < ProductUserId , ulong , bool > > ConnectedDisconnectedUserEvents = null ;
104104
105105 [ System . Diagnostics . Conditional ( "EOS_TRANSPORT_DEBUG" ) ]
106- private void log ( string msg )
106+ private void Log ( string msg )
107107 {
108108 Debug . Log ( msg ) ;
109109 }
110110
111111 [ System . Diagnostics . Conditional ( "EOS_TRANSPORT_DEBUG" ) ]
112- private void logWarning ( string msg )
112+ private void LogWarning ( string msg )
113113 {
114114 Debug . LogWarning ( msg ) ;
115115 }
116116
117117 [ System . Diagnostics . Conditional ( "EOS_TRANSPORT_DEBUG" ) ]
118- private void logError ( string msg )
118+ private void LogError ( string msg )
119119 {
120120 Debug . LogError ( msg ) ;
121121 }
@@ -138,7 +138,7 @@ public override void Send(ulong clientId, ArraySegment<byte> payload, NetworkDel
138138
139139 ProductUserId userId = GetUserId ( clientId ) ;
140140
141- log ( $ "EOSP2PTransport.Send: [ClientId='{ clientId } ', UserId='{ userId } ', PayloadBytes='{ payload . Count } ', SendTimeSec='{ Time . realtimeSinceStartup } ']") ;
141+ Log ( $ "EOSP2PTransport.Send: [ClientId='{ clientId } ', UserId='{ userId } ', PayloadBytes='{ payload . Count } ', SendTimeSec='{ Time . realtimeSinceStartup } ']") ;
142142
143143 Epic . OnlineServices . P2P . PacketReliability reliability = Epic . OnlineServices . P2P . PacketReliability . ReliableOrdered ;
144144 if ( networkDelivery == NetworkDelivery . Unreliable )
@@ -158,7 +158,7 @@ public override void Send(ulong clientId, ArraySegment<byte> payload, NetworkDel
158158 {
159159 if ( reliability != Epic . OnlineServices . P2P . PacketReliability . ReliableOrdered )
160160 {
161- logError ( $ "EOSP2PTransport.Send: Unable to send payload - The payload size ({ payload . Count } bytes) exceeds the maxmimum packet size supported by EOS P2P ({ EOSTransportManager . MaxPacketSize } bytes).") ;
161+ LogError ( $ "EOSP2PTransport.Send: Unable to send payload - The payload size ({ payload . Count } bytes) exceeds the maxmimum packet size supported by EOS P2P ({ EOSTransportManager . MaxPacketSize } bytes).") ;
162162 return ;
163163 }
164164 }
@@ -196,7 +196,7 @@ public override NetworkEvent PollEvent(out ulong clientId, out ArraySegment<byte
196196 payload = new ArraySegment < byte > ( ) ;
197197 receiveTime = Time . realtimeSinceStartup ;
198198 NetworkEvent networkEventType = evntIsConnectionEvent ? NetworkEvent . Connect : NetworkEvent . Disconnect ;
199- log ( $ "EOSP2PTransport.PollEvent: [{ networkEventType } , ClientId='{ clientId } ', UserId='{ evntUserId } ', PayloadBytes='{ payload . Count } ', RecvTimeSec='{ receiveTime } ']") ;
199+ Log ( $ "EOSP2PTransport.PollEvent: [{ networkEventType } , ClientId='{ clientId } ', UserId='{ evntUserId } ', PayloadBytes='{ payload . Count } ', RecvTimeSec='{ receiveTime } ']") ;
200200 return networkEventType ;
201201 }
202202
@@ -208,15 +208,15 @@ public override NetworkEvent PollEvent(out ulong clientId, out ArraySegment<byte
208208 clientId = GetTransportId ( userId ) ;
209209 payload = new ArraySegment < byte > ( packet ) ;
210210 receiveTime = Time . realtimeSinceStartup ;
211- log ( $ "EOSP2PTransport.PollEvent: [{ NetworkEvent . Data } , ClientId='{ clientId } ', UserId='{ userId } ', PayloadBytes='{ payload . Count } ', RecvTimeSec='{ receiveTime } ']") ;
211+ Log ( $ "EOSP2PTransport.PollEvent: [{ NetworkEvent . Data } , ClientId='{ clientId } ', UserId='{ userId } ', PayloadBytes='{ payload . Count } ', RecvTimeSec='{ receiveTime } ']") ;
212212 return NetworkEvent . Data ;
213213 }
214214
215215 // Otherwise, nothing to report
216216 clientId = InvalidClientId ;
217217 payload = new ArraySegment < byte > ( ) ;
218218 receiveTime = 0 ;
219- log ( "EOSP2PTransport.PollEvent: []" ) ;
219+ Log ( "EOSP2PTransport.PollEvent: []" ) ;
220220 return NetworkEvent . Nothing ;
221221 }
222222
@@ -233,7 +233,7 @@ public override bool StartClient()
233233#endif
234234 if ( ServerUserIdToConnectTo == null )
235235 {
236- log ( "EOSP2PTransport.StartClient: No ServerUserIDToConnectTo set!" ) ;
236+ Log ( "EOSP2PTransport.StartClient: No ServerUserIDToConnectTo set!" ) ;
237237 return false ;
238238 }
239239
@@ -253,17 +253,17 @@ public override bool StartClient()
253253 // Attempt to connect to the server hosted by ServerUserId - was the request successfully initiated?
254254 if ( result = P2PManager . OpenConnection ( ServerUserId , P2PSocketName ) )
255255 {
256- log ( $ "EOSP2PTransport.StartClient: Successful Client start up - REQUESTED outgoing '{ P2PSocketName } ' socket connection with Server UserId Server UserId='{ ServerUserId } '.") ;
256+ Log ( $ "EOSP2PTransport.StartClient: Successful Client start up - REQUESTED outgoing '{ P2PSocketName } ' socket connection with Server UserId Server UserId='{ ServerUserId } '.") ;
257257 result = true ;
258258 }
259259 else
260260 {
261- logError ( $ "EOSP2PTransport.StartClient: Failed Client start up - Unable to initiate a connect request with Server UserId='{ ServerUserId } '.") ;
261+ LogError ( $ "EOSP2PTransport.StartClient: Failed Client start up - Unable to initiate a connect request with Server UserId='{ ServerUserId } '.") ;
262262 }
263263 }
264264 else
265265 {
266- logError ( "EOSP2PTransport.StartClient: Failed Client start up - 'ServerUserIdToConnectTo' is null or invalid."
266+ LogError ( "EOSP2PTransport.StartClient: Failed Client start up - 'ServerUserIdToConnectTo' is null or invalid."
267267 + " Please set a valid EOS ProductUserId of the Server host this Client should try connecting to in the 'ServerUserIdToConnectTo' property before calling StartClient"
268268 + $ " (ServerUserIdToConnectTo='{ ServerUserIdToConnectTo } ').") ;
269269 }
@@ -277,7 +277,7 @@ public override bool StartClient()
277277 public override bool StartServer ( )
278278 {
279279 Debug . Assert ( IsInitialized ) ;
280- log ( $ "EOSP2PTransport.StartServer: Entering Server mode with EOS UserId='{ OurUserId } '.") ;
280+ Log ( $ "EOSP2PTransport.StartServer: Entering Server mode with EOS UserId='{ OurUserId } '.") ;
281281#if UNITY_EDITOR
282282 ServerUserIDForCopying = OurUserId . ToString ( ) ;
283283#endif
@@ -304,7 +304,7 @@ public override void DisconnectRemoteClient(ulong clientId)
304304
305305 ProductUserId userId = GetUserId ( clientId ) ;
306306
307- log ( $ "EOSP2PTransport.DisconnectRemoteClient: Disconnecting ClientId='{ clientId } ' (UserId='{ userId } ') from our Server.") ;
307+ Log ( $ "EOSP2PTransport.DisconnectRemoteClient: Disconnecting ClientId='{ clientId } ' (UserId='{ userId } ') from our Server.") ;
308308 P2PManager . CloseConnection ( userId , P2PSocketName , true ) ;
309309 }
310310
@@ -316,7 +316,7 @@ public override void DisconnectLocalClient()
316316 Debug . Assert ( IsInitialized ) ;
317317 Debug . Assert ( IsServer == false ) ;
318318
319- log ( $ "EOSP2PTransport.DisconnectLocalClient: Disconnecting our Client from the Server (UserId='{ ServerUserId } ').") ;
319+ Log ( $ "EOSP2PTransport.DisconnectLocalClient: Disconnecting our Client from the Server (UserId='{ ServerUserId } ').") ;
320320 P2PManager . CloseConnection ( ServerUserId , P2PSocketName , true ) ;
321321 }
322322
@@ -355,7 +355,7 @@ public override ulong GetCurrentRtt(ulong clientId)
355355 public override void Shutdown ( )
356356 {
357357 Debug . Assert ( IsInitialized ) ;
358- log ( "EOSP2PTransport.Shutdown: Shutting down Epic Online Services Peer-2-Peer NetworkTransport." ) ;
358+ Log ( "EOSP2PTransport.Shutdown: Shutting down Epic Online Services Peer-2-Peer NetworkTransport." ) ;
359359 IsInitialized = false ;
360360
361361 // Shutdown EOS Peer-2-Peer Manager
@@ -385,12 +385,12 @@ public override void Shutdown()
385385 public override void Initialize ( NetworkManager networkManager )
386386 {
387387 Debug . Assert ( IsInitialized == false ) ;
388- log ( "EOSP2PTransport.Initialize: Initializing Epic Online Services Peer-2-Peer NetworkTransport." ) ;
388+ Log ( "EOSP2PTransport.Initialize: Initializing Epic Online Services Peer-2-Peer NetworkTransport." ) ;
389389
390390 // EOSManager should already be initialized and exist by this point
391391 if ( EOSManager . Instance == null )
392392 {
393- logError ( "EOSP2PTransport.Initialize: Unable to initialize - EOSManager singleton is null (has the EOSManager component been added to an object in your initial scene?)" ) ;
393+ LogError ( "EOSP2PTransport.Initialize: Unable to initialize - EOSManager singleton is null (has the EOSManager component been added to an object in your initial scene?)" ) ;
394394 return ;
395395 }
396396
@@ -419,7 +419,7 @@ public override void Initialize(NetworkManager networkManager)
419419 P2PManager . OnConnectionClosedCb = OnConnectionClosedCallback ;
420420 if ( P2PManager . Initialize ( ) == false )
421421 {
422- logError ( "EOSP2PTransport.Initialize: Unable to initialize - EOSP2PManager failed to initialize." ) ;
422+ LogError ( "EOSP2PTransport.Initialize: Unable to initialize - EOSP2PManager failed to initialize." ) ;
423423 P2PManager . OnIncomingConnectionRequestedCb = null ;
424424 P2PManager . OnConnectionOpenedCb = null ;
425425 P2PManager . OnConnectionClosedCb = null ;
@@ -444,7 +444,7 @@ public override void Initialize(NetworkManager networkManager)
444444 {
445445 if (data.ResultCode == Result.Success)
446446 {
447- log ("Logout Successful. [" + data.ResultCode + "]");
447+ Log ("Logout Successful. [" + data.ResultCode + "]");
448448 GameStateManager.ChangeScene("MainMenu", false);
449449 }
450450 });
@@ -464,13 +464,13 @@ public void OnIncomingConnectionRequestedCallback(ProductUserId userId, string s
464464 if ( IsServer && socketName == P2PSocketName )
465465 {
466466 // Accept connection request
467- log ( $ "EOSP2PTransport.OnIncomingConnectionRequestedCallback: ACCEPTING incoming '{ socketName } ' socket connection request from UserId='{ userId } '.") ;
467+ Log ( $ "EOSP2PTransport.OnIncomingConnectionRequestedCallback: ACCEPTING incoming '{ socketName } ' socket connection request from UserId='{ userId } '.") ;
468468 P2PManager . OpenConnection ( userId , socketName ) ;
469469 }
470470 else
471471 {
472472 // Reject connection request
473- log ( $ "EOSP2PTransport.OnIncomingConnectionRequestedCallback: REJECTING incoming '{ socketName } ' socket connection request from UserId='{ userId } '.") ;
473+ Log ( $ "EOSP2PTransport.OnIncomingConnectionRequestedCallback: REJECTING incoming '{ socketName } ' socket connection request from UserId='{ userId } '.") ;
474474 P2PManager . CloseConnection ( userId , socketName ) ;
475475 }
476476 }
@@ -484,7 +484,7 @@ public void OnConnectionOpenedCallback(ProductUserId userId, string socketName)
484484 {
485485 Debug . Assert ( IsInitialized ) ;
486486
487- log ( $ "EOSP2PTransport.OnConnectionOpenedCallback: '{ socketName } ' socket connection OPENED with UserId='{ userId } '.") ;
487+ Log ( $ "EOSP2PTransport.OnConnectionOpenedCallback: '{ socketName } ' socket connection OPENED with UserId='{ userId } '.") ;
488488 if ( socketName == P2PSocketName )
489489 {
490490 if ( IsServer )
@@ -520,7 +520,7 @@ public void OnConnectionClosedCallback(ProductUserId userId, string socketName)
520520 {
521521 Debug . Assert ( IsInitialized ) ;
522522
523- log ( $ "EOSP2PTransport.OnConnectionClosedCallback: '{ socketName } ' socket connection CLOSED with UserId='{ userId } '.") ;
523+ Log ( $ "EOSP2PTransport.OnConnectionClosedCallback: '{ socketName } ' socket connection CLOSED with UserId='{ userId } '.") ;
524524 if ( socketName == P2PSocketName )
525525 {
526526 // We're the Server?
0 commit comments