private void w1_SendProgress(object sender, AxMSWinsockLib.DMSWinsockControlEvents_SendProgressEvent e) { MessageBox.Show("w1_SendProgress"); }
private void w1_ConnectionRequest_1(object sender, AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent e) { try { Object ob = true; if (ServerOpen1 == true) { w1.Close(); w1.Accept(e.requestID); w1.SendData(ob); } if (ServerOpen2 == true) { w2.Close(); w2.Accept(e.requestID); } if (ServerOpen3 == true) { w3.Close(); w3.Accept(e.requestID); } if (ServerOpen4 == true) { w4.Close(); w4.Accept(e.requestID); } if (ServerOpen5 == true) { w5.Close(); w5.Accept(e.requestID); } if (ServerOpen6 == true) { w6.Close(); w6.Accept(e.requestID); } } catch (Exception ex) { string s = ""; s = ex.Message; int j =0; j++; } }
private void w1_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e) { try { String data = ""; Object dat = (object)data; w1.GetData(ref dat); spieler sp = new spieler((string)dat, 0); spnr++; w1.SendData("O+" + spnr.ToString()); ServerOpen1 = true; m_spieler.Add(sp); } catch (Exception ex) { String s = ex.Message; int kk = 0; kk++; } }
private void w1_ConnectionRequest(object sender,AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent e) { //with this commands we accept the connection request to the server.. try { w1.Close(); w1.Accept(e.requestID); } catch (Exception ex) { MessageBox.Show(ex.Message); } //now we are connected with the client }