Dart中的RawSocket是否允许直接发送和接收IP数据包? [英] Does RawSocket in Dart allow to send and receive directly IP packets?

查看:308
本文介绍了Dart中的RawSocket是否允许直接发送和接收IP数据包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,原始套接字允许发送和接收IP数据包,而无需任何特定的传输层



Dart的 dart:io随附 RawSocket 类定义为套接字的低级接口(也许表示TCP套接字)。



<我的问题是Dart的RawSocket是否允许直接发送和接收IP数据包?如果没有,在Dart中有没有办法做到这一点?

解决方案

据我所知,尚无法在Dart中直接发送和接收IP数据包。 RawSocket 及其变体不应混淆使用所谓的原始套接字,因为它们只是暴露系统发出的原始事件。这些套接字类具有Raw前缀的事实仅仅是不幸的命名选择的结果。


As I know raw socket allows to send and receive IP packets without any specific transport layer protocol.

Dart's "dart:io" comes with RawSocket class defined as a low-level interface to a socket (maybe they mean TCP socket).

My question is does Dart's RawSocket allow to directly send and receive IP packets? if not, is there're any way to do so in Dart?

解决方案

As far as I know, there is no possible way to directly send and receive IP packets in Dart. RawSocket and its variants shouldn't be confused with what are known as raw sockets, as they just expose raw events signaled by the system. The fact that these socket classes have the Raw prefix is just the result of an unfortunate naming choice.

这篇关于Dart中的RawSocket是否允许直接发送和接收IP数据包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆