System::Net::Sockets::UdpClient::Send 方法

UdpClient::Send(System::ArrayPtr<uint8_t>, int32_t) method

向远程主机发送 UDP 数据报。

int32_t System::Net::Sockets::UdpClient::Send(System::ArrayPtr<uint8_t> dgram, int32_t bytes)
ParameterType描述
dgramSystem::ArrayPtr<uint8_t>要发送的 Byte 类型数组。
字节int32_t数据报中的字节数。

ReturnValue

已发送的字节数。

另见

UdpClient::Send(System::ArrayPtr<uint8_t>, int32_t, String, int32_t) method

向指定远程主机的指定端口发送 UDP 数据报。

int32_t System::Net::Sockets::UdpClient::Send(System::ArrayPtr<uint8_t> dgram, int32_t bytes, String hostname, int32_t port)
ParameterType描述
dgramSystem::ArrayPtr<uint8_t>要发送的 Byte 类型数组
字节int32_t数据报中的字节数。
主机名字符串远程主机的名称。
portint32_t远程端口号。

ReturnValue

已发送的字节数。

另见

UdpClient::Send(System::ArrayPtr<uint8_t>, int32_t, System::SharedPtr<IPEndPoint>) method

向远程端点的主机发送 UDP 数据报。

int32_t System::Net::Sockets::UdpClient::Send(System::ArrayPtr<uint8_t> dgram, int32_t bytes, System::SharedPtr<IPEndPoint> endPoint)
ParameterType描述
dgramSystem::ArrayPtr<uint8_t>要发送的 Byte 类型数组
字节int32_t数据报中的字节数。
endPointSystem::SharedPtr<IPEndPoint>表示要发送数据报的主机和端口的 IPEndPoint

ReturnValue

已发送的字节数。

另见