Back to Adaptive Vision Library website

You are here: Start » Function Reference » TCP IP » TcpIp_WriteBuffer

TcpIp_WriteBuffer


Outputs a block of raw data through a connected TCP socket.

Syntax

void avl::TcpIp_WriteBuffer
(
	avl::SocketId inSocket,
	const avl::ByteBuffer& inBuffer
)

Parameters

Name Type Default Description
inSocket SocketId Connected socket ID.
inBuffer const ByteBuffer& Buffer with data to send.

Description

This filter writes arbitrary bytes to a connected socket.

Data buffer for the inBuffer input can be prepared using filters from the Binary Data category.

This filter can raise IoError when the connection is broken or closed by the other side, when the output buffer overflows because the other side is not receiving data or receiving data too slow, or when other network-related error occurred.

Hints

  • Connect inSocket with the output of TcpIp_Connect or TcpIp_Accept.
  • Connect the data you want to send to the inBuffer input.

Multithreaded environment

This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.

See Also