W3cubDocs

/Dart 2

RawSocketOption class

The RawSocketOption is used as a parameter to Socket.setRawOption and RawSocket.setRawOption to set customize the behaviour of the underlying socket.

It allows for fine grained control of the socket options, and its values will be passed to the underlying platform's implementation of setsockopt and getsockopt.

Annotations
  • @Since("2.2")

Constructors

RawSocketOption(int level, int option, Uint8List value)
const
Creates a RawSocketOption for getRawOption andSetRawOption. [...]
RawSocketOption.fromBool(int level, int option, bool value)
factory
Convenience constructor for creating a bool based RawSocketOption.
RawSocketOption.fromInt(int level, int option, int value)
factory
Convenience constructor for creating an int based RawSocketOption.

Properties

levelint
final
The level for the option to set or get. [...]
optionint
final
The option to set or get.
valueUint8List
final
The raw data to set, or the array to write the current option value into. [...]
hashCodeint
read-only, inherited
The hash code for this object. [...]
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.

Methods

noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
toString() → String
inherited
Returns a string representation of this object.

Operators

operator ==(dynamic other) → bool
inherited
The equality operator. [...]

Static Properties

IPv4MulticastInterfaceint
read-only
Socket option for IP_MULTICAST_IF.
IPv6MulticastInterfaceint
read-only
Socket option for IPV6_MULTICAST_IF.
levelIPv4int
read-only
Socket level option for IPPROTO_IP.
levelIPv6int
read-only
Socket level option for IPPROTO_IPV6.
levelSocketint
read-only
Socket level option for SOL_SOCKET.
levelTcpint
read-only
Socket level option for IPPROTO_TCP.
levelUdpint
read-only
Socket level option for IPPROTO_UDP.

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-io/RawSocketOption-class.html