Module server::net
[−]
[src]
The network api
This module defines types and functions to read and write objects from and to a TcpStream. However, the types in this module are types that are passed to other methods and thus more "high level". They do not represent the byte layout of objects in the protocol!
Protocol
All communication is send using TCP, which emulates a data stream. On top of TCP, this database sends single packets.
Every packet begins with a four byte length
field that contains the
size of the packet in network byte order.
...
Modules
types |
Enums
Error |
Collection of possible errors while communicating with the client. |
Functions
do_handshake |
Write a welcome-message to the given server-client-stream. |
read_commands |
Read the sent bytes, extract the kind of command. |
read_login |
Read the data from the response to the handshake, username and password extracted and returned. |
send_error_package |
Send error package with given error code status. |
send_info_package |
Send information package only with package type information. |
send_response_package |
Send Result package as response to a query. |