ไม่มี:: ไอเน็ต:: UDPEndPoint
#include <src/inet/UDPEndPoint.h>
ออบเจ็กต์ของคลาสนี้แสดงถึงปลายทางการขนส่ง UDP
สรุป
Nest Inet Layer สรุปวิธีการโต้ตอบกับปลายทางการส่งข้อมูล UDP (ซ็อกเก็ต SOCK_DGRAM บนระบบที่ได้รับมาจาก Linux และ BSD) หรือบล็อกควบคุมโปรโตคอล LwIP UDP เนื่องจากระบบได้รับการกำหนดค่าตามนั้น
มรดก
สืบทอดจาก: NL :: Inet :: IPEndPointBasisงานสาธารณะ | |
---|---|
Bind (IPAddressType addrType, IPAddress addr, uint16_t port, InterfaceId intfId) | ผูกปลายทางกับที่อยู่ IP ของอินเทอร์เฟซ |
BindInterface (IPAddressType addrType, InterfaceId intf) | ผูกปลายทางกับอินเทอร์เฟซเครือข่าย |
Close (void) | void ปิดจุดสิ้นสุด |
Free (void) | void ปิดจุดปลายและรีไซเคิลหน่วยความจำ |
GetBoundInterface (void) | InterfaceId รับอินเทอร์เฟซที่ผูกไว้บนปลายทางนี้ |
GetBoundPort (void) | uint16_t |
Listen (void) | เตรียมปลายทางเพื่อรับข้อความ UDP |
SendMsg (const IPPacketInfo *pktInfo, Weave::System::PacketBuffer *msg, uint16_t sendFlags) | ส่งข้อความ UDP ไปยังปลายทางที่ระบุ |
SendTo ( IPAddress addr, uint16_t port, Weave::System::PacketBuffer *msg, uint16_t sendFlags) | ไวพจน์สำหรับ SendTo(addr, port, INET_NULL_INTERFACEID, msg, sendFlags) |
SendTo ( IPAddress addr, uint16_t port, InterfaceId intfId, Weave::System::PacketBuffer *msg, uint16_t sendFlags) | ส่งข้อความ UDP ไปยังที่อยู่ปลายทางที่ระบุ |
งานสาธารณะ
ผูก
INET_ERROR Bind( IPAddressType addrType, IPAddress addr, uint16_t port, InterfaceId intfId )
ผูกปลายทางกับที่อยู่ IP ของอินเทอร์เฟซ
ผูกปลายทางกับที่อยู่ IP ของอินเทอร์เฟซเครือข่ายที่ระบุ
รายละเอียด | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
พารามิเตอร์ |
| ||||||||||||||
ส่งกลับค่า |
|
บน LwIP ต้องไม่เรียกเมธอดนี้พร้อมกับสแต็กล็อก LwIP ที่ได้รับมาแล้ว
BindInterface
INET_ERROR BindInterface( IPAddressType addrType, InterfaceId intf )
ผูกปลายทางกับอินเทอร์เฟซเครือข่าย
ผูกปลายทางกับที่อยู่ IP ของอินเทอร์เฟซเครือข่ายที่ระบุ
รายละเอียด | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
พารามิเตอร์ |
| ||||||||||
ส่งกลับค่า |
|
บน LwIP ต้องไม่เรียกเมธอดนี้พร้อมกับสแต็กล็อก LwIP ที่ได้รับมาแล้ว
ปิด
void Close( void )
ปิดจุดสิ้นสุด
หาก mState != kState_Closed
แล้วปิดปลายทางลบออกจากชุดของปลายทางที่มีสิทธิ์สำหรับการจัดกิจกรรมการสื่อสาร
บนระบบ LwIP ต้องไม่เรียกเมธอดนี้พร้อมกับสแต็กล็อก LwIP ที่ได้รับมาแล้ว
ฟรี
void Free( void )
ปิดจุดปลายและรีไซเคิลหน่วยความจำ
เรียก Close
วิธีแล้วเรียก InetLayerBasis::Release
วิธีการที่จะกลับวัตถุที่สระว่ายน้ำของหน่วยความจำ
บนระบบ LwIP ต้องไม่เรียกเมธอดนี้พร้อมกับสแต็กล็อก LwIP ที่ได้รับมาแล้ว
GetBoundInterface
InterfaceId GetBoundInterface( void )
รับอินเทอร์เฟซที่ผูกไว้บนปลายทางนี้
รายละเอียด | |
---|---|
คืนสินค้า | InterfaceId รหัสอินเตอร์เฟสที่ถูกผูกไว้ |
GetBoundPort
uint16_t GetBoundPort( void )
ฟัง
INET_ERROR Listen( void )
เตรียมปลายทางเพื่อรับข้อความ UDP
หาก State
มีอยู่แล้ว kState_Listening
แล้วไม่มีการดำเนินการจะดำเนินการมิฉะนั้น mState
ถูกตั้งค่าให้ kState_Listening
และปลายทางที่มีการเตรียมที่จะได้รับข้อความ UDP ตามความหมายของแพลตฟอร์ม
รายละเอียด | |||||
---|---|---|---|---|---|
ส่งกลับค่า |
|
บน LwIP จะต้องไม่เรียกเมธอดนี้ด้วย LwIP stack lock ที่ได้รับมาแล้ว
ส่งข้อความ
INET_ERROR SendMsg( const IPPacketInfo *pktInfo, Weave::System::PacketBuffer *msg, uint16_t sendFlags )
ส่งข้อความ UDP ไปยังปลายทางที่ระบุ
Send the UDP message in \c msg to the destination address and port given in \c pktInfo. If \c pktInfo contains an interface id, the message will be sent over the specified interface. If \c pktInfo contains a source address, the given address will be used as the source of the UDP message. Where (sendFlags & kSendFlag_RetainBuffer) != 0, calls Weave::System::PacketBuffer::Free on behalf of the caller, otherwise this method deep-copies \c msg into a fresh object, and queues that for transmission, leaving the original \c msg available after return.
รายละเอียด | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
พารามิเตอร์ |
| ||||||||||||
ส่งกลับค่า |
|
ส่งถึง
INET_ERROR SendTo( IPAddress addr, uint16_t port, Weave::System::PacketBuffer *msg, uint16_t sendFlags )
ไวพจน์สำหรับ SendTo(addr, port, INET_NULL_INTERFACEID, msg, sendFlags)
ส่งถึง
INET_ERROR SendTo( IPAddress addr, uint16_t port, InterfaceId intfId, Weave::System::PacketBuffer *msg, uint16_t sendFlags )
ส่งข้อความ UDP ไปยังที่อยู่ปลายทางที่ระบุ
If possible, then this method sends the UDP message \c msg to the destination \c addr (with \c intfId used as the scope identifier for IPv6 link-local destinations) and \c port with the transmit option flags encoded in \c sendFlags. Where (sendFlags & kSendFlag_RetainBuffer) != 0, calls Weave::System::PacketBuffer::Free on behalf of the caller, otherwise this method deep-copies \c msg into a fresh object, and queues that for transmission, leaving the original \c msg available after return.
รายละเอียด | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
พารามิเตอร์ |
| ||||||||||||
ส่งกลับค่า |
|