예제 #1
0
파일: PeerForm.cs 프로젝트: davidajulio/hx
        private void unregisterServerButton_Click(object sender, EventArgs e)
        {
            burraForm = new BurraForm();
            burraForm.Show(this);

            unregistFromServerWorker.RunWorkerAsync();
        }
예제 #2
0
파일: PeerForm.cs 프로젝트: davidajulio/hx
        private void registerServerButton_Click(object sender, EventArgs e)
        {
            burraForm = new BurraForm();
            burraForm.Show(this);

            string ipAddress = addressTextBox.Text.Trim();
            Protocol protocol = protocolComboBox.SelectedIndex == 0 ? Protocol.TCP : Protocol.HTTP;
            int port = int.Parse(portTextBox.Text.Trim());
            string serverName = serverNameTextBox.Text.Trim();
            EndPointInfo endPointInfo = new EndPointInfo(serverName, ipAddress, protocol, port);

            registOnServerWorker.RunWorkerAsync(endPointInfo);
        }