NuoDb.Data.Client.EncodedDataStream.startMessage C# (CSharp) Method

startMessage() public method

public startMessage ( int messageType ) : void
messageType int
return void
        public virtual void startMessage(int messageType)
        {
            currentMessageType = messageType;
            reset();
            encodeInt(messageType);
        }

Usage Example

        public override bool Read()
        {
            if (this.pendingRows == null)
                return false;

            //int maxRows = statement == null ? 0 : statement.MaxRows;
            int maxRows = 0;

            for (; ; )
            {
                if (maxRows > 0 && currentRow >= maxRows)
                {
                    afterLast_Renamed = true;

                    return false;
                }

                if (!pendingRows.EndOfMessage)
                {
                    int result = pendingRows.getInt();

                    if (result == 0)
                    {
                        afterLast_Renamed = true;

                        return false;
                    }

                    ++numberRecords;
                    currentRow++;

                    for (int n = 0; n < numberColumns; ++n)
                    {
                        values[n] = pendingRows.getValue();
                    }

                    //clearWarnings();

                    return true;
                }

                pendingRows = new RemEncodedStream(connection.InternalConnection.protocolVersion);
                pendingRows.startMessage(Protocol.Next);
                pendingRows.encodeInt(handle);
                connection.InternalConnection.sendAndReceive(pendingRows);
            }
        }
All Usage Examples Of NuoDb.Data.Client.EncodedDataStream::startMessage