程序是通了,但是没法转发,获取不到对方ip.nio中 udp使用的是DatagramChannel ,但是SelectorKey.channel()转化之后的DatagramChannel,调用getRemoteAddress()获取不到对方的ip信息. 看了下java doc A selectable channel for datagram-oriented sockets. A datagram channel is created by invoking one of the open
public class DemoModel { public string Name { get; set; } public int Age { get; set; } } [HttpPost] public ActionResult About(DemoModel model) { return Json(model); } [HttpPost] public ActionResult About(string Name, int Age) { return Json(model); }