当前位置: 首页>>代码示例>>C#>>正文


C# ClientState类代码示例

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


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


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