登录
首页 » LabView » ALOHA-MAC

ALOHA-MAC

于 2014-08-08 发布 文件大小:2243KB
0 339
下载积分: 1 下载次数: 3

代码说明:

  该程序实现了Aloha MAC协议,对于了解协议很有帮助(The program implements Aloha MAC protocol, the protocol is helpful for understanding)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • c# 扫描IP Http Header
    c# 扫描IP Http Headerusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;using System.IO;namespace HScan{ public partial class Form1 : Form { int _currentThreads = 0; int _maxThreads = 100; Thread main = null; Thread mt = null; List threads = new List(); public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; } private void btnStart_Click(object sender, EventArgs e) { btnStart.Enabled = false; if (txtStart.Text.Trim() == "") { MessageBox.Show("起始IP不能为空."); return; } if (txtEnd.Text.Trim() == "") { MessageBox.Show("结束IP不能为空."); return; } int ts = Convert.ToInt32(txtThreads.Text); _maxThreads = ts; string startIp = txtStart.Text; string endIp = txtEnd.Text; TParameter tp=new TParameter(); tp.StartIp=startIp; tp.EndIp=endIp; tp.ThreadCount=ts; main = new Thread(new ParameterizedThreadStart(StartMe)); main.Start(tp); } protected void ThreadManage() { Thread c=null; while (true) { System.Object lockThis = new System.Object(); lock (lockThis) { for (int i = 0; i < threads.Count; i ) { if (threads[i] != null && !threads[i].IsAlive) { c = threads[i]; break; } } if (c != null) { threads.Remove(c); } } } } protected void StartMe(object ob) { mt = new Thread(new ThreadStart(ThreadManage)); mt.Start(); TParameter p = ob as TParameter; string curIp = p.StartIp; while (true) { for (int i = 0; i < _maxThreads; i ) { if (curIp != "") { if (_currentThreads >= _maxThreads) break; System.Object lockThis = new System.Object(); lock (lockThis) { _currentThreads ; if (_currentThreads > _maxThreads) _currentThreads = _maxThreads; string tip = curIp; Thread t = new Thread(new ParameterizedThreadStart(Run)); t.Start(tip); threads.Add(t); curIp = IPUtility.getLastIp(curIp, p.EndIp, 1); } } else { break; } } } } protected void Run(object ob) { string ip = ob.ToString(); SocketGetHead h = new SocketGetHead(); string ret = h.GetHtml(ip, 80); if (ret.IndexOf("DVRDVS-Webs") > 0) { ListViewItem item = new ListViewItem(); item.SubItems[0].Text = (listView1.Items.Count 1).ToString(); ListViewItem.ListViewSubItem lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = ip; item.SubItems.Add(lvSubItem); lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = "DVRDVS-Webs"; item.SubItems.Add(lvSubItem); listView1.Items.Add(item); } System.Object lockThis = new System.Object(); lock(lockThis) { lblCurIp.Text = ip; _currentThreads--; if (_currentThreads < 0) _currentThreads = 0; } } private void tsmCopy_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { string ip = listView1.SelectedItems[0].SubItems[1].Text; Clipboard.SetText(ip); } } private void tsmExport_Click(object sender, EventArgs e) { StreamWriter writer = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory "\export.txt",true); foreach (ListViewItem item in listView1.Items) { string ip=item.SubItems[1].Text; writer.WriteLine(ip); writer.Flush(); } writer.Flush(); writer.Close(); MessageBox.Show("导出成功!"); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } Thread.Sleep(5000); } private void btnStop_Click(object sender, EventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } btnStart.Enabled = true; } }}
    2014-06-23下载
    积分:1
  • Fiddler5020182
    说明:  Fiddler是一个http协议调试代理工具,它能够记录并检查所有你的电脑和互联网之间的http通讯,设置断点,查看所有的“进出”Fiddler的数据(指cookie,html,js,css等文件)。 Fiddler 要比其他的网络调试器要更加简单,因为它不仅仅暴露http通讯还提供了一个用户友好的格式(Fiddler is a http protocol debugging agent tool that logs and checks all http traffic between your computer and the Internet, sets breakpoints, and views all "in and out" Fiddler data (referring to files such as cookie,html,js,css). Fiddler is simpler than other network debuggers because it not only exposes http traffic but also provides a user-friendly format)
    2018-12-26 19:39:10下载
    积分:1
  • 年龄别生育率ASFRecorder在改进版,基础可以:与巴…
    ASFR+是在ASFRecorder的基础上的改进版本,它可以: ◇支持中文文件名. ◇多线程下载ASF文件. ◇断点续传,自动重试. ◇支持MMS(TCP)协议和HTTP协议(自动探测). ◇在下载时修正数据,确保100%与原文件相同.-ASFR ASFRecorder is on the basis of the improved version, it could : With the backing file. With the multi-threaded download ASF. Over HTTP, automatic retry. With the support of MMS (TCP) protocol and the HTTP protocol (automatic detection). With the amendments to the download data to ensure that 100% of the same original document.
    2022-01-26 03:57:39下载
    积分:1
  • VC++MFC TCP_SOCKET最简单的TCP传输协议 ,可以在这上面所以的加你喜欢的扩展功能
    本人自己编写的最简单的TCP_SOCKET传输协议,有助于初学者了解SOCKET编程,一窥SOCKET的奥秘! 希望对大家有所帮祝!
    2022-08-20 20:51:36下载
    积分:1
  • [计算机网络第五版]计算机网络第五版
    说明:  计算机网络第五版 tcp/ip协议 计算机(Fifth Edition of Computer Network)
    2019-03-01 11:20:42下载
    积分:1
  • ADP
    自适应动态规划,利用BP神经网络,进行迭代更新,得到最优值(Adaptive dynamic programming using BP neural network)
    2021-04-02 14:29:07下载
    积分:1
  • FTP服务器(c++源码)
    FTP服务器(c++源码)
    2019-11-02下载
    积分:1
  • p2p software, the use of peer
    p2p软件,利用p2p技术进行文件共享,搜索等-p2p software, the use of peer-to-peer file-sharing technologies, such as search
    2022-08-10 13:13:23下载
    积分:1
  • shuangjiaoxian
    通过他可以学会如何制作双绞线连接网络,如何制作直连和交叉两种类型的双绞线(through he can learn how to produce UTP connectivity, and how to make direct cross-company and the two types of UTP)
    2007-06-10 11:04:34下载
    积分:1
  • gen_demo
    a code generation framework implemented in Ruby that attempts to go beyond the classic substitution of variables in templates
    2013-10-25 09:41:43下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载