System.Win.ScktComp.TCustomWinSocket.SendStreamThenDrop

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SendStreamThenDrop(AStream: TStream): Boolean;

C++

bool __fastcall SendStreamThenDrop(System::Classes::TStream* AStream);

Properties

Type Visibility Source Unit Parent
function public
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TCustomWinSocket

Description

Writes all the information that can be read from the AStream parameter to the socket connection and then terminates the connection.

Use SendStreamThenDrop to write to a socket connection when the connection is no longer needed after the writing is complete. SendStream reads information from the stream indicated by AStream and writes it to the socket connection, shutting down the connection when it is done. The value returned by SendStream indicates whether any information was successfully written to the connection.

Note: The Stream passed as a parameter to SendStream becomes "owned" by the windows socket object. The Windows socket object frees the stream when it is finished with it. Do not attempt to free the stream after it has been passed as a parameter.

See Also