• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ClientState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ClientState的典型用法代码示例。如果您正苦于以下问题:C# ClientState类的具体用法?C# ClientState怎么用?C# ClientState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ClientState类属于命名空间,在下文中一共展示了ClientState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SetState

 public void SetState(ClientState state)
 {
     _cstate = state;
     switch (state)
     {
         case ClientState.kCLIENT_STATE_LOGINSERVER_CONNECT_IN_PROGRESS:
             _state = "kCLIENT_STATE_LOGINSERVER_CONNECT_IN_PROGRESS";
             break;
         case ClientState.kCLIENT_STATE_LOGINSERVER_CONNECT_COMPLETE:
             _state = "kCLIENT_STATE_LOGINSERVER_CONNECT_COMPLETE";
             break;
         case ClientState.kCLIENT_STATE_LOGIN_IN_PROGRESS:
             _state = "kCLIENT_STATE_LOGIN_IN_PROGRESS";
             break;
         case ClientState.kCLIENT_STATE_LOGIN_SUCCESS:
             _state = "kCLIENT_STATE_LOGIN_SUCCESS";
             break;
         case ClientState.kCLIENT_STATE_CHARACTER_LIST_RECEIVED:
             _state = "kCLIENT_STATE_CHARACTER_LIST_RECEIVED";
             break;
         case ClientState.kCLIENT_STATE_WORLD_LIST_RECEIVED:
             _state = "kCLIENT_STATE_WORLD_LIST_RECEIVED";
             break;
     }
 }
开发者ID:harleyknd1,项目名称:rAPB,代码行数:25,代码来源:LobbyClient.cs


示例2: cancelJoining

    private void cancelJoining()
    {
        Debug.Log("Cancel joining");

        clientState=ClientState.ClientSearch;
        Network.Disconnect();
    }
开发者ID:Gris87,项目名称:PingPong3D,代码行数:7,代码来源:NetworkManager.cs


示例3: _presentationClient_OnChanged

 void _presentationClient_OnChanged(object sender, ClientState e)
 {
     if (OnChanged != null)
     {
         OnChanged.Invoke(sender, e);
     }
 }
开发者ID:AlexSneg,项目名称:VIRD-1.0,代码行数:7,代码来源:RemotePresentationClient.cs


示例4: ReadFileService

 public ReadFileService(ClientState clientState, string semantics, int fileRegisterId)
     : base(clientState)
 {
     FileRegisterId = fileRegisterId;
     Semantics = semantics;
     ReadedFile = null;
 }
开发者ID:hfcorreia,项目名称:padi-fs,代码行数:7,代码来源:ReadFileService.cs


示例5: JoinServer

    private void JoinServer(HostData hostData)
    {
        Debug.Log("Joining to server: "+hostData.gameName+" | "+hostData.ip[0]+":"+hostData.port.ToString());

        clientState=ClientState.ClientJoin;
        Network.Connect(hostData);
    }
开发者ID:Gris87,项目名称:PingPong3D,代码行数:7,代码来源:NetworkManager.cs


示例6: tReceive

        private void tReceive()
        {
            byte[] buffer = new byte[4096];
            int bytesRead;

            while(true)
            {
                bytesRead = 0;

                try
                {
                    bytesRead = stream.Read(buffer, 0, 4096);
                    observer.OnNotify(new MessageWrapper(MessageType.Normal, buffer, Id));
                }
                catch
                {
                    State = ClientState.Disconnected;
                    observer.OnNotify(new MessageWrapper(MessageType.Disconnect, null, Id));
                    break;
                }

                if (bytesRead == 0)
                {
                    State = ClientState.Disconnected;
                    observer.OnNotify(new MessageWrapper(MessageType.Disconnect, null, Id));
                    break;
                }
            }
        }
开发者ID:reparadocs,项目名称:Clash,代码行数:29,代码来源:Client.cs


示例7: UpdateUserInterface

 private void UpdateUserInterface(ClientState currentState)
 {
     if (currentState == ClientState.SignedIn) {
         //Listen for events of changes of the contact's information
         lyncClient.Self.Contact.ContactInformationChanged +=
             new EventHandler<ContactInformationChangedEventArgs>(SelfContact_ContactInformationChanged);
     }
 }
开发者ID:wendellinfinity,项目名称:LyncHCI,代码行数:8,代码来源:LyncRunner.cs


示例8: CreateFileService

 public CreateFileService(ClientState clientState, string filename, int numberOfDataServers, int readQuorum, int writeQuorum)
     : base(clientState)
 {
     FileName = filename;
     NumberOfDataServers = numberOfDataServers;
     ReadQuorum = readQuorum;
     WriteQuorum = writeQuorum;
 }
开发者ID:hfcorreia,项目名称:padi-fs,代码行数:8,代码来源:CreateFileService.cs


示例9: Execute

 public Task Execute(Uri recentFeedUri, EventProcessor eventProcessor, HttpResourceClient httpResourceClient, ClientState clientState)
 {
     foreach (var item in ((IEnumerable<SyndicationItem>)encounteredItems).Reverse())
     {
         eventProcessor.Process(item);
         clientState.RecordSuccessfullyProcessed(item);
     }
     return new Terminate();
 }
开发者ID:alexscordellis,项目名称:atom-client,代码行数:9,代码来源:ProcessItemsTask.cs


示例10: ClientServant

 public ClientServant(TcpClient client)
 {
     m_id = null;
     m_state = ClientState.Initial;
     m_client = client;
     m_readingThread = new Thread(Reading);
     m_writingQueue = new Queue<Message>();
     m_writingThread = new Thread(Writing);
     m_clientIPEndPoint = client.Client.RemoteEndPoint as IPEndPoint;
 }
开发者ID:hoxily,项目名称:Wuziqi,代码行数:10,代码来源:ClientServant.cs


示例11: GetContent

        public string GetContent(ClientState state)
        {
            Guid clientGuid = new Guid(state.ClientGuid);
            if (!NotificationStore.ContainsKey(clientGuid))
                return "";

            string result = new JavaScriptSerializer().Serialize(NotificationStore[clientGuid]);
            NotificationStore[clientGuid].Clear();
            return result;
        }
开发者ID:gmltA,项目名称:MunchkinOnline,代码行数:10,代码来源:NotificationManager.cs


示例12: Open

 public void Open()
 {
     try {
         OpenConnection();
         OnOpen();
         state = ClientState.Open;
     } catch (Exception) {
         state = ClientState.Broken;
         throw;
     }
 }
开发者ID:erpframework,项目名称:cloudb,代码行数:11,代码来源:PathClient.cs


示例13: Close

 public void Close()
 {
     try {
         CloseConnection();
         OnClosed();
         state = ClientState.Closed;
     } catch (Exception) {
         state = ClientState.Broken;
         throw;
     }
 }
开发者ID:erpframework,项目名称:cloudb,代码行数:11,代码来源:PathClient.cs


示例14: AddIntlPortDialogBox

        public AddIntlPortDialogBox(ClientState client)
        {
            InitializeComponent();

            foreach (var country in client.GetAllCountries())
            {
                //this.originComboBox.Items.Add(countries.Name);
                ComboBoxItem cbi = new ComboBoxItem();
                cbi.Content = country.Name;
                cbi.Tag = country.ID;
                this.countries.Items.Add(cbi);
            }
        }
开发者ID:patrick478,项目名称:SWEN301-KPSmart,代码行数:13,代码来源:AddIntlPortDialogBox.xaml.cs


示例15: MqttClient

        public MqttClient(string clientId, IMqttClient client)
        {
            if (clientId.Length < 1 || clientId.Length > 23)
            {
                throw new ArgumentException("Client identifier must be between 1 and 23 charascters.");
            }

            _clientState = ClientState.Disconnected;
            ClientId = clientId;
            _client = client;
            _client.OnMessageReceived += ClientOnMessageReceived;
            _client.OnNetworkDisconnected += ClientOnOnNetworkDisconnected;
            _manager = new StateMachineManager(_client);
        }
开发者ID:4058665,项目名称:MQTT,代码行数:14,代码来源:MqttClient.cs


示例16: Connect

 public Task Connect(EndPoint endPoint)
 {
     var tcs = new TaskCompletionSource<bool>();
     _pipeline.OpenConnection(endPoint,
         ex =>
         {
             _state = ClientState.Connect;
             if (ex != null)
                 tcs.SetException(ProcessException(ex));
             else
                 tcs.SetResult(true);
         });
     return tcs.Task;
 }
开发者ID:tomeucapo,项目名称:RedisBoost,代码行数:14,代码来源:RedisChannel.cs


示例17: CheckClient

 public bool CheckClient(ClientState state)
 {
     HttpCookie notificationClientCookie = state.CurrentContext.Request.Cookies.Get(guidCookieName);
     HttpCookie notificationClientTokenCookie = state.CurrentContext.Request.Cookies.Get(tokenCookieName);
     if (notificationClientCookie != null && !string.IsNullOrEmpty(notificationClientCookie.Value) &&
         notificationClientTokenCookie != null && !string.IsNullOrEmpty(notificationClientTokenCookie.Value))
     {
         if (string.Compare(notificationClientTokenCookie.Value, (GenerateToken(state, notificationClientCookie.Value)), true) == 0)
         {
             state.ClientGuid = notificationClientCookie.Value;
             return true;
         }
     }
     return false;
 }
开发者ID:gmltA,项目名称:MunchkinOnline,代码行数:15,代码来源:NotificationManager.cs


示例18: SharpMessagingClient

 public SharpMessagingClient(string identity, IExtensionRegistry extensionRegistry)
 {
     _extensionService = new ExtensionService(extensionRegistry, DeliverMessage);
     _state = ClientState.ClientToServerHandshake1;
     _connection = new Connection.Connection(identity, _extensionService, false, _bufferManager)
     {
         ExtensionFrameReceived = OnExtensionFrame,
         MessageFrameReceived = OnMessageFrame,
         WriteCompleted = OnWriteCompleted,
         //ReceiveBufferSize = 65535
     };
     _connection.HandshakeReceived += OnServerHandshakeFrame;
     _connection.Disconnected += OnDisconnected;
     _connection.Fault += OnConnectionFault;
 }
开发者ID:jmptrader,项目名称:SharpMessaging,代码行数:15,代码来源:SharpMessagingClient.cs


示例19: Execute

        public Task Execute(Uri recentFeedUri, EventProcessor eventProcessor, HttpResourceClient httpResourceClient, ClientState clientState)
        {
            var entry = feed.Items.ElementAt(entryIndex);

            if (!clientState.HaveAlreadyProcessed(entry))
            {
                encounteredItems.Add(entry);

                if (feed.Items.Count() > entryIndex + 1)
                {
                    return new NavigateEntryTask(feed, entryIndex + 1, encounteredItems);
                }
                return new NavigatePreviousArchiveTask(feed, encounteredItems);
            }

            return new ProcessItemsTask(encounteredItems);
        }
开发者ID:alexscordellis,项目名称:atom-client,代码行数:17,代码来源:NavigateEntryTask.cs


示例20: Connection

        public Connection(TcpClient c, ServerHost s)
        {
            Client = c;
            Server = s;
            ClientStream = Client.GetStream();
            cancelToken = cTokenSource.Token;

            originIP = Client.Client.RemoteEndPoint.ToString();

            Client.LingerState = new LingerOption(false, 0);

            State = ClientState.CONNECTED;

            Server.Connections.Add(this);

            Helper.LogConsole("Connection", string.Format("New connection from {0}", originIP));
            Task.Run(WaitForData, cancelToken).ConfigureAwait(false);
            Task.Run(DoPostConnect);
        }
开发者ID:Ephemeralis,项目名称:Convergence,代码行数:19,代码来源:Connection.cs



注:本文中的ClientState类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ClientType类代码示例发布时间:2022-05-24
下一篇:
C# ClientProcessor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap