高分求C# snmp trap 接受 的 源码

once_and_again 2009-07-03 11:04:42
我想用C#写一个snmp trap 的接受程序,目前查了好多资料,还是没有头绪,高分求snmptrap接收的源码


...全文
289 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
fuheng 2010-09-16
  • 打赏
  • 举报
回复
顶了吧,我也在找这方面的资料,现在
wls12342004 2009-10-14
  • 打赏
  • 举报
回复
不知道你的C#是什么版本,好像2003是不行的,当时我用VC.net 写的trap接收,在C#中调用。光在C#中是很难的。
但听说2005后的版本都支撑,但没研究过了。
once_and_again 2009-07-03
  • 打赏
  • 举报
回复
不明白,希望能详细点,我没做过这方面的,谢谢
suners 2009-07-03
  • 打赏
  • 举报
回复
00000000000
kkun_3yue3 2009-07-03
  • 打赏
  • 举报
回复
参考获取控制台输出代码

Process p = new Process();
p.StartInfo.FileName = strExePath;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
//p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;


p.Start();
p.StandardInput.WriteLine("ucci");
p.StandardInput.WriteLine("setoption batch on");

//p.StandardInput.WriteLine("position fen 4C4/4a4/b2ank2b/9/9/1RNR1crC1/3r1p3/3cKA3/4A4/4n4 w - - 0 1");
p.StandardInput.WriteLine( "position fen " + _Fen + " " + ( isRed ? "r" : "b" ) + " - - 0 0" );
p.StandardInput.WriteLine("go time 5000");

p.StandardInput.WriteLine("quit");
string re = p.StandardOutput.ReadToEnd();
p.Close();

110,477

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧