Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #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);
        }
Beispiel #4
0
 public virtual void Init(EndianType endian, int packageLenthSize, IPackageCreator creator)
 {
     m_PackageLenSize = packageLenthSize;
     m_EndType        = endian;
     m_OrignCreator   = creator;
 }
Beispiel #5
0
 public abstract void SetPackageCreator(IPackageCreator creator);