Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:io
  3. RawSocket
  4. sendMessage abstract method
sendMessage
description

sendMessage abstract method

intsendMessage(
  1. List<SocketControlMessage>controlMessages,
  2. List<int>data, [
  3. intoffset =0,
  4. int?count,
])

Writes socket control messages and data bytes to the socket.

WritescontrolMessages and up tocount bytes ofdata,starting atoffset, to the socket. Ifcount is not provided,as many bytes as possible are written. Usewrite instead if no controlmessages are required to be sent.

When sent control messages are received, they are retained until thenext call toreadMessage, where all currently available control messagesare provided as part of the returnedSocketMessage.Callingread will read only data bytes, and will not affect controlmessages.

Thecount must be positive (greater than zero).

Returns the number of bytes written, which cannot be greater thancount, nor greater thandata.length - offset.Return value of zero indicates that control messages were not sent.

This function is non-blocking and will only write dataif buffer space is available in the socket.

Throws anOSError if message could not be sent out.

Unsupported byRawSecureSocket.

Unsupported on Android, Fuchsia, Windows.

Implementation

int sendMessage(  List<SocketControlMessage> controlMessages,  List<int> data, [  int offset = 0,  int? count,]);
  1. Dart
  2. dart:io
  3. RawSocket
  4. sendMessage abstract method
RawSocket class

[8]ページ先頭

©2009-2025 Movatter.jp