|
Jun
20
|
StunLink 用 C# 语言编写, 可以穿透绝大多数 NAT 和防火墙, 在局域网中的传输速度能达到 8M/s 的速度, 它基于 UDP, 使用与 TCP 类似的滑动窗口机制保证可靠传输. StunLink 的使用方法很简单:
StunLink link = new StunLink();
link.RemoteInfo["IP"] = "1.2.3.4";
link.RemoteInfo["Port"] = "20000";
link.RemoteInfo["Password"] = "einj8ds1mx2";
try{
link.Connect();
}catch{
// 连接失败.
}
// Connect 方法成功返回后已经建立了连接.
byte[] buf = ...
link.Send(buf);
int len = link.Receive(buf);
...
Related posts:
One Response to “C# P2P 传输模块”
Pages:
Leave a Reply

2008-08-12 at 06:55:11
您好请问那里可以找到STUNLINK..
可以发一份资料到我电邮吗
万分感谢
yuan@satkey.com.cn