Difference between revisions of "Midware TMWBuffer"

From Overbyte
Jump to navigation Jump to search
(Created page with ' Main page -> Midware component reference -> TMWBuffer == Overview == {| | '''unit''' |||| RForma…')
 
Line 14: Line 14:
 
== Properties ==
 
== Properties ==
 
{|  
 
{|  
| width="140" valign="top" | [[Midware_TAppServer.Banner | Banner]] |||| The banner property is the text that is sent to the client when the connection has been established. Default value is 'Welcome to MidWare server'.
+
| width="140" valign="top" | [[Midware_TMWBuffer.AutoExpand | AutoExpand]] |||| AutoExpand property tells the component if the data buffer can be expanded when it is too short for the data that needs to be written to it.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.ClientCount | ClientCount]] |||| Gives the actual number of connected clients.
+
| valign="top" | [[Midware_TMWBuffer.Bof | Bof]] |||| Bof property is TRUE when current position has reached begin of file.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.ClientCountLabel | ClientCountLabel]] |||| If assigned, this property will be used by TAppServer component to display the number of client connected.
+
| valign="top" | [[Midware_TMWBuffer.DataBuffer | DataBuffer]] |||| Gives access to the underlaying data buffer.  
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.ClientTimeout | ClientTimeout]] |||| ClientTimeout gives the time in seconds before the server disconnect a client without activity.
+
| valign="top" | [[Midware_TMWBuffer.DataBufferCount | DataBufferCount]] |||| he size in bytes of the data present in the buffer.  
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.ClientWSocket | ClientWSocket]] |||| ClientWSocket is a run-time read-only indexed property whose value is the reference to each connected client TClientWSocket component.
+
| valign="top" | [[Midware_TMWBuffer.DataBufferSize | DataBufferSize]] |||| The size in bytes of the current buffer.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.ConnectCount | ConnectCount]] |||| ConnectCount gives the total number of connection received since server startup.
+
| valign="top" | [[Midware_TMWBuffer.Eof | Eof]] |||| Eof property is TRUE when current position has reached end of file.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.DisplayMemo | DisplayMemo]] |||| If assigned, this property will be used by TAppServer component to display messages during work.
+
| valign="top" | [[Midware_TMWBuffer.FieldCount | FieldCount]] |||| Returns the number of fields in the current record.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.Handle | Handle]] |||| The Handle property is the windows handle for the hidden window the component uses for internal messages
+
| valign="top" | [[Midware_TMWBuffer.Fields | Fields]] |||| The indexed Fields[] property gives access to the current record's fields.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.Options | Options]] |||| Options are used by TAppServer to modify behaviour.
+
| valign="top" | [[Midware_TMWBuffer.FieldSize | FieldSize]] |||| Return field size in bytes.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.Port | Port]] |||| The port property gives the port number or service name used by the server to listen for client connection.
+
| valign="top" | [[Midware_TMWBuffer.FieldType | FieldType]] |||| Read only indexed property returning filed type for a given field in current record.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.RequestBroker | RequestBroker]] |||| The server component receive client requests, data parameters and send replies to client.
+
| valign="top" | [[Midware_TMWBuffer.HasData | HasData]] |||| HasData property is TRUE when TMWBuffer contains data.  
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.RequestCount | RequestCount]] |||| RequestCount gives the total number of requests received since server startup.
+
| valign="top" | [[Midware_TMWBuffer.HeaderSize | HeaderSize]] |||| Size in byte of the header in the data buffer. Default to 0.
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.SrvWSocket | SrvWSocket]] |||| SrvWSocket is the underlaying TWSocket component used to listen for for client connections.
+
| valign="top" | [[Midware_TMWBuffer.MetaData | MetaData]] |||| Read only indexed MetaData property gives access to the current record's meta data (application defined).
 
|-
 
|-
| valign="top" | [[Midware_TAppServer.Timeoutlnterval | Timeoutlnterval]] |||| The server periodically check for client timeout.
+
| valign="top" | [[Midware_TMWBuffer.RecordCount | RecordCount]] |||| Readonly property RecordCount retunrs the number of records stored in TMWBuffer. See also FieldCount.
 
|}
 
|}

Revision as of 09:33, 5 May 2011

Main page -> Midware component reference -> TMWBuffer

Overview

unit RFormat.pas

TMWBuffer if a very important component in MidWare technology. TMWBuffer implement data storage and formatting for transmission. Data echanged between client and server is exactly TMWBuffer content, byte for byte.

TMWBuffer can be seen as a data table in memory. This table is organized as records made of variable field number, each field having a variable length.

TMWBuffer provides methods and properties to read, write and sort data. Data is stored in a very simple format: a buffer dynamically allocated from memory that contains all fields and records. Fields and records boundaries are marked with delimiters. If control characaters or delimiters are found within data, they are escaped. Three delimiters are used: escape delimiter, field delimiter and record delimiter. They are placed at start of buffer in order to consitute a kind of dictionnary.

Properties

AutoExpand AutoExpand property tells the component if the data buffer can be expanded when it is too short for the data that needs to be written to it.
Bof Bof property is TRUE when current position has reached begin of file.
DataBuffer Gives access to the underlaying data buffer.
DataBufferCount he size in bytes of the data present in the buffer.
DataBufferSize The size in bytes of the current buffer.
Eof Eof property is TRUE when current position has reached end of file.
FieldCount Returns the number of fields in the current record.
Fields The indexed Fields[] property gives access to the current record's fields.
FieldSize Return field size in bytes.
FieldType Read only indexed property returning filed type for a given field in current record.
HasData HasData property is TRUE when TMWBuffer contains data.
HeaderSize Size in byte of the header in the data buffer. Default to 0.
MetaData Read only indexed MetaData property gives access to the current record's meta data (application defined).
RecordCount Readonly property RecordCount retunrs the number of records stored in TMWBuffer. See also FieldCount.