public IXPRequest(Networking.Client client, IXPFile request, Action<string> responseDelegate) { _request = request; _responseDelegate = responseDelegate; _client = client; Thread thread = new Thread(new ThreadStart(Work)); thread.Start(); }
public Form1() { InitializeComponent(); _client = new Networking.Client("127.0.0.1", 10250); _client.Connect(); FormClosing += Form1_FormClosing; }
private void btnReconnect_Click(object sender, EventArgs e) { _client = new Client("127.0.0.1", 10250); if(_client.Connect()) { MessageBox.Show("Connected"); } else { MessageBox.Show("Failed"); } }
public static void Main(string[] args) { Client c = null; Server s = null; //Server s = new Server(); if (args[0].Equals ("c")) { c = new Client (args[1].ToString (), Convert.ToInt32 (args[2])); } else if (args[0].Equals ("s")) { s = new Server (); } }
public FormMain() { InitializeComponent(); _client = new Client("127.0.0.1", 10250); if (!_client.Connect()) { _client = null; return; } _client.Disconnected += Client_Disconnected; _client.MessageReceived += Client_MessageReceived; FormClosing += FormMain_FormClosing; }