单声道兼容网络/套接字库

Ada*_*ile 9 c# sockets mono networking

那里有没有Mono(C#)兼容的网络/套接字库吗?

最好是:

  • 多螺纹
  • 事件驱动
  • 能够连接多个
  • 处理客户端和服务器件
  • 运行Mono和MS .NET运行时
  • 非常简单
  • 免费(可在商业软件中使用)

如果它是:它真的很棒:

  • .NET Compact Framework(Windows Mobile)兼容
  • MonoTouch(iPhone)兼容

编辑:

为了澄清更多,我的"高于TCP/IP的一级"评论意味着我想要的东西基本上是一个自包含的服务器/客户端.我不想处理编写线程代码,处理每个连接等等.例如,我希望代码看起来像这样:

Server s = new Server(8080);
s.NewConnection += new ConnectionEventHandler(NewConnection);
s.DataRecieved += new DataEventHandler(NewData);
s.Start();

void NewConnection(object sender, EventArgs e)
{
   s.Send((Connection)sender, "Hello World!"); //(Connection)sender is the connection instance so the server knows which to send the response to
}

void NewData(object sender, EventArgs e)
{
   s.Send((Connection)sender, e.Data); //Echo back
}
Run Code Online (Sandbox Code Playgroud)

不是最干净的代码,但我认为它提供了基本的想法.

Mar*_*rcF 4

现在已经存在这样的东西,请查看networkComms.net。满足您所需的所有功能,并且 100% 与单声道兼容。

免责声明:我是这个商业图书馆的开发人员之一。