librsync  2.3.4
Functions
netint.h File Reference

Network-byte-order output to the tube. More...

Include dependency graph for netint.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

rs_result rs_squirt_byte (rs_job_t *job, rs_byte_t val)
 Write a single byte to a stream output. More...
 
rs_result rs_squirt_netint (rs_job_t *job, rs_long_t val, int len)
 Write a variable-length integer to a stream. More...
 
rs_result rs_squirt_n4 (rs_job_t *job, int val)
 
rs_result rs_suck_byte (rs_job_t *job, rs_byte_t *val)
 
rs_result rs_suck_netint (rs_job_t *job, rs_long_t *val, int len)
 
rs_result rs_suck_n4 (rs_job_t *job, int *val)
 
int rs_int_len (rs_long_t val)
 

Detailed Description

Network-byte-order output to the tube.

All the ‘suck’ routines return a result code. The most common values are RS_DONE if they have enough data, or RS_BLOCKED if there is not enough input to proceed.

The squirt routines also return a result code which in theory could be RS_BLOCKED if there is not enough output space to proceed, but in practice is always RS_DONE.

Definition in file netint.h.

Function Documentation

◆ rs_squirt_byte()

rs_result rs_squirt_byte ( rs_job_t job,
rs_byte_t  val 
)

Write a single byte to a stream output.

Definition at line 38 of file netint.c.

◆ rs_squirt_netint()

rs_result rs_squirt_netint ( rs_job_t job,
rs_long_t  val,
int  len 
)

Write a variable-length integer to a stream.

Parameters
job- Job of data.
val- Value to write out.
len- Length of integer, in bytes.

Definition at line 44 of file netint.c.

◆ rs_squirt_n4()

rs_result rs_squirt_n4 ( rs_job_t job,
int  val 
)

Definition at line 59 of file netint.c.

◆ rs_suck_byte()

rs_result rs_suck_byte ( rs_job_t job,
rs_byte_t *  val 
)

Definition at line 64 of file netint.c.

◆ rs_suck_netint()

rs_result rs_suck_netint ( rs_job_t job,
rs_long_t *  val,
int  len 
)

Definition at line 74 of file netint.c.

◆ rs_suck_n4()

rs_result rs_suck_n4 ( rs_job_t job,
int *  val 
)

Definition at line 89 of file netint.c.

◆ rs_int_len()

int rs_int_len ( rs_long_t  val)

Definition at line 99 of file netint.c.