Exemple #1
0
 public SFConnection(SFIMessageRouter messageRouter, ProtocolType protocolType = ProtocolType.MRUDP)
 {
     // Don't use constructor of SFObject, it will increase reference count of the object
     if (protocolType == ProtocolType.MRUDP)
     {
         NativeHandle = NativeCreateConnection();
     }
     else
     {
         NativeHandle = NativeCreateConnectionTCP();
     }
     m_MessageRouter = messageRouter;
 }
Exemple #2
0
 public OnlineClient(SFIMessageRouter messageRouter = null)
 {
     NativeHandle    = NativeCreateOnlineClient();
     m_MessageRouter = messageRouter;
 }
Exemple #3
0
 public SFConnection(IntPtr nativeHandle, SFIMessageRouter messageRouter = null)
 {
     // Don't use constructor of SFObject, it will increase reference count of the object
     NativeHandle    = nativeHandle;
     m_MessageRouter = messageRouter;
 }
Exemple #4
0
 public SFConnection(SFConnectionGroup group, SFIMessageRouter messageRouter)
 {
     // Don't use constructor of SFObject, it will increase reference count of the object
     NativeHandle    = NativeCreateConnectionWithGroup(group.NativeHandle);
     m_MessageRouter = messageRouter;
 }