~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to vio/violite.h

  • Committer: Monty Taylor
  • Date: 2008-09-16 01:37:05 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916013705-772d1t7rh9ah9j1x
Moved more functions into drizzle.c as part of the split of code.
Added accessor function for drizzle_port.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef vio_violite_h_
22
22
#define vio_violite_h_
23
23
 
 
24
#include <sys/socket.h>
 
25
#include <errno.h>
 
26
 
24
27
/* Simple vio interface in C;  The functions are implemented in violite.c */
25
28
 
26
29
#ifdef  __cplusplus
43
46
void    vio_delete(Vio* vio);
44
47
int     vio_close(Vio* vio);
45
48
void    vio_reset(Vio* vio, enum enum_vio_type type, int sd, uint32_t flags);
46
 
size_t  vio_read(Vio *vio, uchar *      buf, size_t size);
47
 
size_t  vio_read_buff(Vio *vio, uchar * buf, size_t size);
48
 
size_t  vio_write(Vio *vio, const uchar * buf, size_t size);
 
49
size_t  vio_read(Vio *vio, unsigned char *      buf, size_t size);
 
50
size_t  vio_read_buff(Vio *vio, unsigned char * buf, size_t size);
 
51
size_t  vio_write(Vio *vio, const unsigned char * buf, size_t size);
49
52
int     vio_blocking(Vio *vio, bool onoff, bool *old_mode);
50
53
bool    vio_is_blocking(Vio *vio);
51
54
/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
121
124
  /* function pointers. They are similar for socket/SSL/whatever */
122
125
  void    (*viodelete)(Vio*);
123
126
  int32_t     (*vioerrno)(Vio*);
124
 
  size_t  (*read)(Vio*, uchar *, size_t);
125
 
  size_t  (*write)(Vio*, const uchar *, size_t);
 
127
  size_t  (*read)(Vio*, unsigned char *, size_t);
 
128
  size_t  (*write)(Vio*, const unsigned char *, size_t);
126
129
  int32_t     (*vioblocking)(Vio*, bool, bool *);
127
130
  bool (*is_blocking)(Vio*);
128
131
  int32_t     (*viokeepalive)(Vio*, bool);