All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
read.c File Reference

Grab data from TDS packets. More...

#include <config.h>
#include <assert.h>
#include <freetds/tds.h>
#include <freetds/iconv.h>
#include <freetds/bytes.h>
#include <freetds/stream.h>
#include <freetds/string.h>
#include <freetds/checks.h>
Include dependency graph for read.c:


static size_t read_and_convert (TDSSOCKET *tds, TDSICONV *char_conv, size_t *wire_size, char *outbuf, size_t outbytesleft)
 For UTF-8 and similar, tds_iconv() may encounter a partial sequence when the chunk boundary is not aligned with the character boundary. More...
DSTRtds_dstr_get (TDSSOCKET *tds, DSTR *s, size_t len)
 Reads a string from wire and put in a DSTR. More...
unsigned char tds_get_byte (TDSSOCKET *tds)
 Return a single byte from the input buffer. More...
TDSRET tds_get_char_data (TDSSOCKET *tds, char *row_buffer, size_t wire_size, TDSCOLUMN *curcol)
 Fetch character data the wire. More...
void * tds_get_n (TDSSOCKET *tds, void *dest, size_t need)
 Get N bytes from the buffer and return them in the already allocated space given to us. More...
size_t tds_get_string (TDSSOCKET *tds, size_t string_len, char *dest, size_t dest_size)
 Fetch a string from the wire. More...
TDS_UINT tds_get_uint (TDSSOCKET *tds)
 Get an int32 from the server. More...
TDS_UINT8 tds_get_uint8 (TDSSOCKET *tds)
 Get an uint64 from the server. More...
TDS_USMALLINT tds_get_usmallint (TDSSOCKET *tds)
 Get an int16 from the server.
unsigned char tds_peek (TDSSOCKET *tds)
 Reads a byte from the TDS stream without removing it. More...
void tds_unget_byte (TDSSOCKET *tds)
 Unget will always work as long as you don't call it twice in a row. More...

Detailed Description

Grab data from TDS packets.