Example #1
0
 public override void SetPackageCreator(IPackageCreator creator)
 {
     if (null == creator)
     {
         return;
     }
     m_PackagetCreator            = creator;
     m_PackagetCreator.endianType = m_EndType;
     m_PackagetCreator.manager    = this;
     m_PackagetCreator.socket     = m_Socket;
     ((UdpPackageCreator)m_PackagetCreator).endPoint = m_EP;
 }
Example #2
0
 public override void SetPackageCreator(IPackageCreator creator)
 {
     if (null == creator)
     {
         return;
     }
     m_PackagetCreator                = creator;
     m_PackagetCreator.endianType     = m_EndType;
     m_PackagetCreator.packageLenSize = m_PackageLenSize;
     m_PackagetCreator.manager        = this;
     m_PackagetCreator.socket         = m_Socket;
 }
Example #3
0
        public bool Init(EndianType endian, string ip, Int32 port, IPackageCreator creator)
        {
            bool bSuccess = false;

            Close();
            m_EndType = endian;
            m_Port    = port;
            m_IP      = ip;
            bSuccess  = _initSocket();
            if (bSuccess)
            {
                SetPackageCreator(creator);
            }
            return(bSuccess);
        }
Example #4
0
 public virtual void Init(EndianType endian, int packageLenthSize, IPackageCreator creator)
 {
     m_PackageLenSize = packageLenthSize;
     m_EndType        = endian;
     m_OrignCreator   = creator;
 }
Example #5
0
 public abstract void SetPackageCreator(IPackageCreator creator);