Stay organized with collections
Save and categorize content based on your preferences.
StructMsghdr
class StructMsghdr
Corresponds to C's struct msghdr
Summary
Public constructors |
Constructs an instance with the given field values
|
Public constructors
Properties
msg_flags
var msg_flags: Int
Flags on received message.
msg_name
var msg_name: SocketAddress?
Optional address.
Sendmsg: Caller must populate to specify the target address for a datagram, or pass null
to send to the destination of an already-connected socket. Recvmsg: Populated by the system to specify the source address.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# StructMsghdr\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nStructMsghdr\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/system/StructMsghdr \"View this page in Java\") \n\n```\nclass StructMsghdr\n```\n\n|---|----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.system.StructMsghdr](#) |\n\nCorresponds to C's `struct msghdr`\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [StructMsghdr](#StructMsghdr(java.net.SocketAddress,%20kotlin.Array,%20kotlin.Array,%20kotlin.Int))`(`msg_name:` `[SocketAddress](../../java/net/SocketAddress.html#)?`, `msg_iov:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[ByteBuffer](../../java/nio/ByteBuffer.html#)!\u003e`, `msg_control:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[StructCmsghdr](/reference/kotlin/android/system/StructCmsghdr)!\u003e?`, `msg_flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructs an instance with the given field values |\n\n| Properties ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|\n| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[StructCmsghdr](/reference/kotlin/android/system/StructCmsghdr)!\\\u003e? | [msg_control](#msg_control:kotlin.Array) Ancillary data |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [msg_flags](#msg_flags:kotlin.Int) Flags on received message. |\n| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[ByteBuffer](../../java/nio/ByteBuffer.html#)!\\\u003e | [msg_iov](#msg_iov:kotlin.Array) Scatter/gather array |\n| [SocketAddress](../../java/net/SocketAddress.html#)? | [msg_name](#msg_name:java.net.SocketAddress) Optional address. |\n\nPublic constructors\n-------------------\n\n### StructMsghdr\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nStructMsghdr(\n msg_name: SocketAddress?, \n msg_iov: Array\u003cByteBuffer!\u003e, \n msg_control: Array\u003cStructCmsghdr!\u003e?, \n msg_flags: Int)\n```\n\nConstructs an instance with the given field values\n\n| Parameters ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `msg_name` | [SocketAddress](../../java/net/SocketAddress.html#)?: This value may be `null`. |\n| `msg_iov` | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[ByteBuffer](../../java/nio/ByteBuffer.html#)!\\\u003e: This value cannot be `null`. |\n| `msg_control` | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[StructCmsghdr](/reference/kotlin/android/system/StructCmsghdr)!\\\u003e?: This value may be `null`. |\n\nProperties\n----------\n\n### msg_control\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar msg_control: Array\u003cStructCmsghdr!\u003e?\n```\n\nAncillary data \n\n### msg_flags\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar msg_flags: Int\n```\n\nFlags on received message. \n\n### msg_iov\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval msg_iov: Array\u003cByteBuffer!\u003e\n```\n\nScatter/gather array \n\n### msg_name\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar msg_name: SocketAddress?\n```\n\nOptional address.\n\nSendmsg: Caller must populate to specify the target address for a datagram, or pass `null` to send to the destination of an already-connected socket. Recvmsg: Populated by the system to specify the source address."]]