System.Net.Socket.TSocketStream.Write

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Write(const Buffer; Count: LongInt): LongInt; overload; override;

C++

virtual int __fastcall Write(const void *Buffer, int Count)/* overload */;
inline int __fastcall  Write(const System::DynamicArray<System::Byte> Buffer, int Offset, int Count){ return System::Classes::TStream::Write(Buffer, Offset, Count); }
inline int __fastcall  Write(const System::DynamicArray<System::Byte> Buffer, int Count){ return System::Classes::TStream::Write(Buffer, Count); }

Properties

Type Visibility Source Unit Parent
function public
System.Net.Socket.pas
System.Net.Socket.hpp
System.Net.Socket TSocketStream

Description

Sends the specified data to the connected endpoint of the socket that yous specified when you created your socket stream.

Write accepts the following parameters:

  • Buf is a pointer to the buffer read the data to send.
  • Count is the length (in bytes) of the buffer pointed by Buf, which is also the maximum length of the specified data that Write sends.

Exceptions

A call to Write can raise any of the following exceptions:

Exception Exception.Message Scenarios

ESocketError

Network socket error: <error message> (<error code>), on API 'send'

See Also