@@ -205,7 +205,7 @@ abstract interface class NetworkInterface {
205
205
/// A `RawServerSocket` and provides a stream of low-level [RawSocket] objects,
206
206
/// one for each connection made to the listening socket.
207
207
///
208
- /// See [RawSocket] for more info .
208
+ /// See [RawSocket] for more information .
209
209
abstract interface class RawServerSocket implements Stream <RawSocket > {
210
210
/// Listens on a given address and port.
211
211
///
@@ -610,9 +610,13 @@ abstract interface class RawSocket implements Stream<RawSocketEvent> {
610
610
/// Writes up to [count] bytes of the buffer from [offset] buffer offset to
611
611
/// the socket.
612
612
///
613
- /// The number of successfully written bytes is returned.
614
- /// This function is non-blocking and will only write data
615
- /// if buffer space is available in the socket.
613
+ /// The number of successfully written bytes is returned. This function is
614
+ /// non-blocking and will only write data if buffer space is available in
615
+ /// the socket. This means that the number of successfully written bytes may
616
+ /// be less than `count` or even 0.
617
+ ///
618
+ /// Transmission of the buffer may be delayed unless
619
+ /// [SocketOption.tcpNoDelay] is set with [RawSocket.setOption] .
616
620
///
617
621
/// The default value for [offset] is 0, and the default value for [count] is
618
622
/// `buffer.length - offset` .
@@ -719,6 +723,10 @@ abstract interface class RawSocket implements Stream<RawSocketEvent> {
719
723
/// Data, as [Uint8List] s, is received by the local socket, made available
720
724
/// by the [Stream] interface of this class, and can be sent to the remote
721
725
/// socket through the [IOSink] interface of this class.
726
+ ///
727
+ /// Transmission of the data sent through the [IOSink] interface may be
728
+ /// delayed unless [SocketOption.tcpNoDelay] is set with
729
+ /// [Socket.setOption] .
722
730
abstract interface class Socket implements Stream <Uint8List >, IOSink {
723
731
/// Creates a new socket connection to the host and port and returns a [Future]
724
732
/// that will complete with either a [Socket] once connected or an error
0 commit comments