Watt-32 tcp/ip  2.2 dev-rel.10
Functions
sock_io.c File Reference

Go to the source code of this file.

Functions

BYTE W32_CALL sock_putc (sock_type *s, BYTE c)
 
int W32_CALL sock_puts (sock_type *s, const BYTE *data)
 
WORD W32_CALL sock_gets (sock_type *s, BYTE *data, int bmax)
 
int W32_CALL sock_getc (sock_type *s)
 
WORD W32_CALL sock_dataready (sock_type *s)
 sock_dataready - returns number of bytes waiting to be read. More...
 
int W32_CALL sock_putcw (sock_type *s, wchar_t ch)
 
int W32_CALL sock_putsw (sock_type *s, const wchar_t *data)
 
int W32_CALL sock_getsw (sock_type *s, wchar_t *data, int n)
 
wchar_t W32_CALL sock_getcw (sock_type *s)
 

Detailed Description

some sock_xx() functions moved from pctcp.c due to memory contraints under Turbo-C

Definition in file sock_io.c.

Function Documentation

WORD W32_CALL sock_dataready ( sock_type s)

sock_dataready - returns number of bytes waiting to be read.

  • if in ASCII mode, return >0 if a terminated line is present or the buffer is full or state is LASTACK (tcp only).
  • if in binary mode (default), simply return number of bytes in receive buffer.
  • For UDP or TCP sockets only.

Definition at line 246 of file sock_io.c.

References _raw_Socket::ip_type, and tcp_Socket::state.

wchar_t W32_CALL sock_getcw ( sock_type s)
Todo:
Wide character version of sock_getc()

Definition at line 322 of file sock_io.c.

int W32_CALL sock_getsw ( sock_type s,
wchar_t *  data,
int  n 
)
Todo:
Wide character version of sock_gets()

Definition at line 315 of file sock_io.c.

int W32_CALL sock_putcw ( sock_type s,
wchar_t  ch 
)
Todo:
Wide character versions of above functions.

Definition at line 301 of file sock_io.c.

int W32_CALL sock_puts ( sock_type s,
const BYTE *  data 
)

<

Todo:
suppport UDP frags

Definition at line 39 of file sock_io.c.

References _raw_Socket::ip_type, sock_flushnext(), and sock_write().

int W32_CALL sock_putsw ( sock_type s,
const wchar_t *  data 
)
Todo:
Wide character version of sock_puts()

Definition at line 308 of file sock_io.c.