예제 #1
0
파일: Server.cs 프로젝트: mskwarek/PKRY
        private void newClientRequest(object a, NetworkLib.ClientArgs e)
        {
            Utils.Logs.addLog("Proxy", NetworkLib.Constants.VOTER_CONNECTED, true, NetworkLib.Constants.LOG_MESSAGE, true);

            try
            {
                updateClientName(e.ID, e.NodeName); //clients as first message send his id
                string msg = NetworkLib.Constants.CONNECTION_SUCCESSFUL + "&";
                sendMessage(clientSockets[e.ID], msg);
                Utils.Logs.addLog("Proxy", NetworkLib.Constants.VOTER_CONNECTED, true, NetworkLib.Constants.LOG_MESSAGE, true);
            }
            catch
            {
            }
        }
예제 #2
0
 private void Server_OnNewMessageRecived(object myObject, NetworkLib.ClientArgs myArgs)
 {
     this.ID = myArgs.ID;
 }