Example #1
0
 /// <summary>
 /// 释放 TCP 客户端输出信息队列
 /// </summary>
 protected void freeCommandQueue()
 {
     TcpServer.ClientCommand.CommandBase head = CommandQueue;
     CommandQueue = null;
     if ((head = head.LinkNext) != null)
     {
         TcpServer.ClientCommand.CommandBase.CancelLink(head);
     }
 }
Example #2
0
 private void freeCommand()
 {
     TcpServer.ClientCommand.CommandBase command = CommandQueue.LinkNext;
     new UnionType {
         Value = CommandQueue
     }.ClientCommand.Free();
     TcpServer.ClientCommand.CommandBase nextCommand = command.LinkNext;
     while (nextCommand != null && new UnionType {
         Value = nextCommand
     }.ClientCommand.IsBuildError)
     {
         new UnionType {
             Value = command
         }.ClientCommand.Free();
         command     = nextCommand;
         nextCommand = nextCommand.LinkNext;
     }
     CommandQueue = command;
 }
Example #3
0
 /// <summary>
 /// 获取当前执行命令
 /// </summary>
 /// <returns></returns>
 private TcpServer.ClientCommand.CommandBase getCurrentCommand()
 {
     TcpServer.ClientCommand.CommandBase command = CommandQueue, nextCommand = command.LinkNext;
     if (new UnionType {
         Value = nextCommand
     }.ClientCommand.IsBuildError)
     {
         do
         {
             new UnionType {
                 Value = command
             }.ClientCommand.Free();
             command     = nextCommand;
             nextCommand = nextCommand.LinkNext;
         }while (new UnionType {
             Value = nextCommand
         }.ClientCommand.IsBuildError);
         CommandQueue = command;
     }
     return(nextCommand);
 }
Example #4
0
 ///// <summary>
 ///// TCP 服务客户端套接字数据发送
 ///// </summary>
 //internal new ClientSocketSender Sender;
 /// <summary>
 /// TCP 服务客户端套接字
 /// </summary>
 /// <param name="ipAddress"></param>
 /// <param name="port"></param>
 /// <param name="log"></param>
 /// <param name="maxInputSize"></param>
 internal ClientSocket(IPAddress ipAddress, int port, ILog log, int maxInputSize) : base(ipAddress, port, log, maxInputSize)
 {
     ClientCommand.Command command = ClientCommand.CheckCommand.Get(this);
     command.FreeLock = 1;
     CommandQueue     = command;
 }
Example #5
0
 /// <summary>
 /// TCP 服务客户端套接字数据发送
 /// </summary>
 /// <param name="socket">TCP 服务客户端套接字</param>
 internal ClientSocketSender(ClientSocket socket)
     : base(socket)
 {
     ClientSocket = socket;
     CommandEnd   = socket.CommandQueue;
 }
Example #6
0
 ///// <summary>
 ///// TCP 服务客户端套接字数据发送
 ///// </summary>
 //internal new ClientSocketSender Sender;
 /// <summary>
 /// TCP 服务客户端套接字
 /// </summary>
 /// <param name="ipAddress"></param>
 /// <param name="port"></param>
 /// <param name="log"></param>
 /// <param name="maxInputSize"></param>
 internal ClientSocket(IPAddress ipAddress, int port, ILog log, int maxInputSize) : base(ipAddress, port, log, maxInputSize)
 {
     ClientCommand.Command command = ClientCommand.CheckCommand.Get(this);
     Interlocked.Exchange(ref command.FreeLock, 1);
     CommandQueue = command;
 }