MALOC
0.1
|
Class Vio: virtual <SDIO/FILE/BUFF/UNIX/INET> I/O layer. More...
Go to the source code of this file.
Classes | |
struct | sVio |
Contains public data members for Vio class. More... | |
Macros | |
#define | VPORTNUMBER 14916 |
our portbase; 5000 < VPORTNUMBER < 49152 More... | |
#define | VIO_MAXBUF 10 |
number of internal buffers (BUFF datatype) More... | |
Typedefs | |
typedef enum VIOtype | VIOtype |
Parameter for I/O type (sdio,buff,file,unix,inet) More... | |
typedef enum VIOfrmt | VIOfrmt |
Parameter for compression type (XDR,ASC) More... | |
typedef enum VIOrwkey | VIOrwkey |
Parameter for rw type (R,RW) More... | |
typedef struct sVio | Vio |
Declaration of the Vio class as the Vio structure. More... | |
Enumerations | |
enum | VIOtype { VIO_NO_TYPE , VIO_SDIO , VIO_BUFF , VIO_FILE , VIO_UNIX , VIO_INET } |
Parameter for I/O type (sdio,buff,file,unix,inet) More... | |
enum | VIOfrmt { VIO_NO_FRMT , VIO_XDR , VIO_ASC } |
Parameter for compression type (XDR,ASC) More... | |
enum | VIOrwkey { VIO_NO_RW , VIO_R , VIO_W } |
Parameter for rw type (R,RW) More... | |
Functions | |
void | Vio_start (void) |
Start Vio communication layer (init internal variables/buffers) More... | |
void | Vio_stop (void) |
Shutdown Vio communication layer. More... | |
Vio * | Vio_ctor (const char *socktype, const char *datafrmt, const char *hostname, const char *filename, const char *rwkey) |
Construct the Vio object. More... | |
int | Vio_ctor2 (Vio *thee, const char *socktype, const char *datafrmt, const char *hostname, const char *filename, const char *rwkey) |
Work routine that Vio_ctor calls to do most of the construction. More... | |
void | Vio_dtor (Vio **thee) |
Destruct the Vio object. More... | |
void | Vio_dtor2 (Vio *thee) |
Work routine that Vio_dtor calls to do most of the destruction. More... | |
void | Vio_setWhiteChars (Vio *thee, char *whiteChars) |
Set the white character set for I/O stream. More... | |
void | Vio_setCommChars (Vio *thee, char *commChars) |
Set the comment character set for I/O stream. More... | |
int | Vio_accept (Vio *thee, int nonblock) |
Accept any waiting connect attempt to our socket on our machine. More... | |
void | Vio_acceptFree (Vio *thee) |
Free the socket child that was used for the last accept. More... | |
int | Vio_connect (Vio *thee, int nonblock) |
Connect to some socket on a remote machine (or on our machine) More... | |
void | Vio_connectFree (Vio *thee) |
Purge any output buffers (for <UNIX/INET>, else a no-op) More... | |
int | Vio_scanf (Vio *thee, char *parms,...) |
Mimic "scanf" from an arbitrary Vio device. More... | |
int | Vio_printf (Vio *thee, char *parms,...) |
Mimic "printf" from an arbitrary Vio device. More... | |
int | Vio_read (Vio *thee, char *buf, int bufsize) |
Read (up to) bufsize characters into buf from input device. More... | |
int | Vio_write (Vio *thee, char *buf, int bufsize) |
Write bufsize characters from buf to output device. More... | |
void | Vio_bufTake (Vio *thee, char *buf, int bufsize) |
Set the pointer to the internal buffer. More... | |
char * | Vio_bufGive (Vio *thee) |
Return the pointer to the internal buffer. More... | |
int | Vio_bufSize (Vio *thee) |
Return the length to the internal buffer. More... | |
Vio * | Vio_socketOpen (char *key, const char *iodev, const char *iofmt, const char *iohost, const char *iofile) |
Socket open for read or write. More... | |
void | Vio_socketClose (Vio **sock) |
Socket close from read or write. More... | |
Class Vio: virtual <SDIO/FILE/BUFF/UNIX/INET> I/O layer.
* * MALOC = < Minimal Abstraction Layer for Object-oriented C > * Copyright (C) 1994-- Michael Holst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *
#define VIO_MAXBUF 10 |
number of internal buffers (BUFF datatype)
#define VPORTNUMBER 14916 |
our portbase; 5000 < VPORTNUMBER < 49152