Пример #1
0
        public GServerBase(NetProtocol protocol, GSocketArgs args)
        {
            if (protocol == null)
            {
                protocol = new NetProtocol();
            }

            this.protocol   = protocol;
            this.socketArgs = args;

            Init();
        }
Пример #2
0
        public GClientBase(NetProtocol protocol, GSocketArgs args)
        {
            if (protocol == null)
            {
                protocol = new NetProtocol();
            }

            this.protocol   = protocol;
            this.socketArgs = args;

            header = new byte[protocol.HeaderSize];
        }