c# - Sending Messages to Selected Ips -
I have an array of IP addresses in which there is a set of IP address, which is communicated to the server. Example: 5 The customer's IP address of 4 will be stored in this IP address array. The remaining one will be blocked when sending a message from the server. How will this be done? My sender's message is shown below.
Private Zero Button SendMsg_Click (Object Sender, EventArgs E) {Object objData = richTextBoxSendMsg.Text; ByData = System.Text.ASCIIEncoding.ASCII.GetBytes (objData.ToString ()); For (int i = 0; i
Try applying an array of n + 1 size, where Place the number in the customer's IP address array as the "Blocked" client (preferably first or last index). So, something like this will happen in your code:
if (m_workerSocket [i] .connected) {clientIp [0] = m_workerSocket [i]; // Index Blocked Clients Client IP [IndexAF (M_Workscat [I])] = Faucet; M_workerSocket [i] .Send (byData); }
After this, return your clientIp
array position, set the value to the original position of the setting mWorkerSocket [i]
and in position 0. You will need a method that will constantly check this array to block the client in the index, while sending data in any way.
Comments
Post a Comment