static void lt_OnConnectionAccepted(object sender, SocketArg e) { GlobalClient gclient = new GlobalClient(e.Socket); gclient.OnAccountInfoRequest += new EventHandler<AccountInfoRequestArgs>(gclient_OnAccountInfoRequest); gclient.OnSpendCoins += Gclient_OnSpendCoins; _server.InputThread.AddConnection(gclient); }
void lt_OnConnectionAccepted(object sender, SocketArg e) { GameClient client = CreateClient(e.Socket); client.OnAccountRequest += new EventHandler<AccountRequestArgs>(client_OnCredentialsRequest); client.OnChatMessage += new EventHandler<ChatMessageArgs>(client_OnChatMessage); InputThread.AddConnection(client); }
static void lt_OnConnectionAccepted(object sender, SocketArg e) { GlobalClient gclient = new GlobalClient(e.Socket); gclient.OnAccountInfoRequest += new EventHandler <AccountInfoRequestArgs>(gclient_OnAccountInfoRequest); gclient.OnSpendCoins += Gclient_OnSpendCoins; gclient.OnAuthStringRequest += Gclient_OnAuthStringRequest; _server.InputThread.AddConnection(gclient); // Send the products to the new client if (Marketplace.Instance.Products != null) { gclient.SendProducts(Marketplace.Instance.Products); } }