Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[ Core ] Meaning of FLAGS?

 [1/8] from: rebolinth::nodep::dds::nl at: 3-Apr-2002 19:09


Hello All, Can anyone explain me the meaning of "flags" within an opened port? And what is the bitmask meaning of the value? example after (server: open tcp://:8000) ... ... make object! [ flags: 786947 misc: [4 [] 0] tail: 0 num: 2 with: "^M^/" custom: none index: 0 func: 3 fpos: 0 inBuffer: none outBuffer: "hi" ] ... ... Thanks in advance... (R)egards, Norman

 [2/8] from: holger:rebol at: 3-Apr-2002 12:22


On Wed, Apr 03, 2002 at 07:09:22PM +0200, [rebolinth--nodep--dds--nl] wrote:
> Hello All, > > Can anyone explain me the meaning of "flags" within an opened port? > And what is the bitmask meaning of the value?
It is for internal use only and varies by port handler. Do not touch. -- Holger Kruse [kruse--nordicglobal--com]

 [3/8] from: rebolinth:nodep:dds:nl at: 3-Apr-2002 23:28


Hello Holger, haha...what would you expect me to do next.. :-) Without any fun... Is the flags used as an internal-rebol setting/counter of any kind or is it used for port-settings? (R)egards, Norman.

 [4/8] from: g:santilli:tiscalinet:it at: 4-Apr-2002 11:09


Hi rebolinth, On Wednesday, April 03, 2002, 7:09:22 PM, you wrote: rndn> Can anyone explain me the meaning of "flags" within an opened port? They are mainly only useful if you are writing a port handler. rndn> And what is the bitmask meaning of the value? The most important ones are in:
>> print mold system/standard/port-flags
make object! [ direct: 524288 pass-thru: 4194304 open-append: 4 open-new: 8 ] A long time ago, while writing a port handler, I was using: modes: make object! [ read: 1 write: 2 new: 8 string: 16 binary: 32 lines: 64 wait: 2048 direct: 524288 ] HTH, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [5/8] from: rebolinth:nodep:dds:nl at: 4-Apr-2002 16:30


Hello, Gabriele Thanks for the reply, Where did you got the information from ? Is this detailed information somewhere in a book, or where you able to tickle the RT ;-) (R)egards, Norman.

 [6/8] from: holger:rebol at: 4-Apr-2002 6:52


On Thu, Apr 04, 2002 at 11:09:57AM +0200, Gabriele Santilli wrote:
> The most important ones are in: > >> print mold system/standard/port-flags
<<quoted lines omitted: 4>>
> open-new: 8 > ]
Yes, and those are the only flags that can be publically accessed, and only from a port handler, not from an application. If you do access flags from a port handler then always use the symbolic names, not the numbers, because they tend to change between REBOL versions.
> A long time ago, while writing a port handler, I was using: > modes: make object! [
<<quoted lines omitted: 7>>
> direct: 524288 > ]
Those values are not correct any more. Don't use them. -- Holger Kruse [kruse--nordicglobal--com]

 [7/8] from: g:santilli:tiscalinet:it at: 4-Apr-2002 22:56


Hi Holger, On Thursday, April 04, 2002, 4:52:36 PM, you wrote: HK> application. If you do access flags from a port handler then HK> always use the symbolic names, not the numbers, because they HK> tend to change between REBOL versions. I had the suspect... HK> Those values are not correct any more. Don't use them. They are from something like Core 2.1 or 2.2. Quite old indeed. I needed them because I wrote a simple file transfer protocol were the server basically simply executed locally the open call that was done remotely; i.e. an open/lines done on the client was translated to an open/lines on the server etc. so it was like having the server's filesystem locally. It worked rather well, but was just an experiment and never evolved to something more than that. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [8/8] from: g:santilli:tiscalinet:it at: 4-Apr-2002 22:49


Hi rebolinth, On Thursday, April 04, 2002, 4:30:08 PM, you wrote: rndn> Where did you got the information from ? In the old days when there were not even a book, :) we simply used experimentation to learn REBOL. ;-) rndn> Is this detailed information somewhere in a book, rndn> or where you able to tickle the RT ;-) I just tried writing a protocol handler, with some help from the list. (It was before Jeff posted his protocol howto however, IIRC.) It was not difficult to guess what the bits meant, as they reflect the refinements passed to the OPEN call (except for PASS-THRU). Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted