#include <msocket.h>
Inheritance diagram for Socket:
Public Methods | |
virtual bool | open (int mode) |
virtual uint | size () const |
virtual int | at () const |
bool | reset () |
virtual int | readBlock (char *data, uint maxlen) |
virtual int | writeBlock (const char *data, uint len) |
virtual int | readLine (char *data, uint maxlen) |
int | writeBlock (const String &) |
virtual char | getch () |
virtual void | putch (char ch) |
virtual void | ungetch (char ch) |
Definition at line 33 of file msocket.h.
|
Returns the current position in device. Only meaningful for "block devices", which have a defined size. Reimplemented from IODevice. |
|
Reads and returns one character from device.
Reimplemented from IODevice. |
|
This file is part of the MagiC++ library. * * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
Reimplemented from IODevice. Definition at line 27 of file msocket.cc. |
|
Writes one character to device.
Reimplemented from IODevice. |
|
Reads a data block from the device.
Reimplemented from IODevice. |
|
Reads a newline (\n) terminated line from device. The buffer must be allocated to contain the given length of bytes. The function spares one byte for the terminating zero, so the actual maximum number of bytes read is one less than the maxlen parameter. Example: // Read in chunks char buffer [1024]; int bytesRead = 0; int totalRead = 0; while (bytesRead = mpDevice->readLine (buffer, 1024)) { linebuf.append (buffer); totalRead += bytesRead; }
Reimplemented from IODevice. |
|
Resets the state of the device to a newly opened state.
Reimplemented from IODevice. |
|
Returns the size of the file in bytes. Only meaningful for "block devices", which have a defined size. Reimplemented from IODevice. |
|
Unreads one character from device. The function has no meaning if the device is already at beginning. Reimplemented from IODevice. |
|
Writes a data block to device.
Reimplemented from IODevice. |
|
Writes a data block to device.
Reimplemented from IODevice. |