예제 #1
0
 private void OnLoginRequested(object o, LoginSendEventArgs e)
 {
     if (e.Connected)
     {
         //Send a command containing the login information (Field 0 = Server PW, Field 1 = User nickname).
         e.ServerConnection.SendUnreliableCommand(0, GenesisConsts.OPCODE_LOGINDETAILS, new string[] { txtServerPW.Text, txtNickName.Text });
         spState.Text = "Sending login details...";
     }
     else
     {
         //Server could not process our connection at this time (possibly full?)
         spState.Text = "Connection rejected - " + e.Reason;
     }
 }
예제 #2
0
 /// <summary>
 /// Server has asked for our login details.
 /// </summary>
 private void m_UDP_OnLoginRequested(object o, LoginSendEventArgs e)
 {
     this.Invoke(new GenesisCore.SendLoginHandler(OnLoginRequested), new object[] { o, e });
 }