All Classes |Grouped Classes |Index

Class CL_TCPConnection

TCP connection socket I/O device. More...

Derived from:

public CL_IODevice

Derived by:

None

Group:

Socket (Network)

#include <ClanLib/network.h>

Class Members:

Enumerations:

SeekMode

Seeking modes.


Attributes:

is_null

Returns true if this object is invalid.

throw_if_null

Throw an exception if this object is invalid.

get_size

Returns the size of data stream.

get_position

Returns the position in the data stream.

is_little_endian

Returns true if the input source is in little endian mode.

get_provider

Returns the provider for this object.


Operations:

send

Send data to device.

receive

Receive data from device.

peek

Peek data from device (data is left in the buffer).

seek

Seek in data stream.

read

Alias for receive(data, len, receive_all)

write

Alias for send(data, len, send_all)

set_system_mode

Changes input data endianess to the local systems mode.

set_big_endian_mode

Changes input data endianess to big endian mode. (Default is little endian)

set_little_endian_mode

Changes input data endianess to little endian mode. This is the default setting.

write_int64

Writes a signed 64 bit integer to output source.

write_uint64

Writes an unsigned 64 bit integer to output source.

write_int32

Writes a signed 32 bit integer to output source.

write_uint32

Writes an unsigned 32 bit integer to output source.

write_int16

Writes a signed 16 bit integer to output source.

write_uint16

Writes an unsigned 16 bit integer to output source.

write_int8

Writes a signed 8 bit integer to output source.

write_uint8

Writes an unsigned 8 bit integer to output source.

write_float

Writes a float to output source.

write_string_a

Writes a string to the output source.

write_string_nul

Writes a nul terminated string to the output source.

write_string_text

Writes a text string to the output source.

read_int64

Reads a signed 64 bit integer from input source.

read_uint64

Reads an unsigned 64 bit integer from input source.

read_int32

Reads a signed 32 bit integer from input source.

read_uint32

Reads an unsigned 32 bit integer from input source.

read_int16

Reads a signed 16 bit integer from input source.

read_uint16

Reads an unsigned 16 bit integer from input source.

read_int8

Reads a signed 8 bit integer from input source.

read_uint8

Reads an unsigned 8 bit integer from input source.

read_float

Reads a float from input source.

read_string_a

Reads a string from the input source.

read_string_nul

Reads a nul terminated string from the input source.

read_string_text

Reads a string from the input source where the source is a text file.

duplicate

Create a new CL_IODevice referencing the same resource.


Construction:

CL_TCPConnection


Attributes:

get_handle

Get Handle.

get_local_name

Get Local name.

get_remote_name

Get Remote name.

get_read_event

Get Read event.

get_write_event

Get Write event.


Operations:

connect

Connect.

set_handle

Set handle.

disconnect_graceful

Performs a graceful shutdown, ensuring all data is sent before the connection is closed.

disconnect_abortive

Performs an abortive shutdown, closing the connection immediately.

set_nodelay

Disables or enables buffering data before it is sent.

set_keep_alive

Enables or disables transmitting keep-alive packets.