Module io_socket

The module is responsible for low level operation with socket.

Copyright © 2010-2014 Alexei Krasnopolski

Version: 1.2.4

Introduced in: 2011-3-24

Authors: Alexei Krasnopolski (krasnop@bellsouth.net) [web site: http://crasnopolski.com/].

Description

The module is responsible for low level operation with socket. The reading from socket includes decompression (if compress mode is set) and parsing input data stream to MySQL logical packets. The writing operation forms from data lists logical packets and compress them if compress mode.

Data Types

socket()

socket() = port()

Function Index

receive_data/2Retreives data from socket and forms it as a list of binary mySQL packets.
send_single_packet/6Sends one single packet to socket output stream.

Function Details

receive_data/2

receive_data(Socket::socket(), Is_compressed::boolean()) -> [#packet{}] | #mysql_error{}

Retreives data from socket and forms it as a list of binary mySQL packets.

send_single_packet/6

send_single_packet(Socket::socket(), Packet_body::binary(), PacketSize::integer(), N::integer(), Is_multi_pack::boolean(), Is_compressed::boolean()) -> ok | #mysql_error{}

Sends one single packet to socket output stream. If the packet has huge length the function splites the packet to chunks and processes these recursively.


Generated by EDoc, Mar 19 2014, 23:27:00.