Thanks Jim!

That was exactly what I was looking for!

Brgds /Micael

-----Ursprungligt meddelande-----
Fr�n: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Skickat: den 13 oktober 1999 22:09
Till: [EMAIL PROTECTED]
�mne: [REBOL] Is there a way of changing the 'state' of a port from
/lines Re:


Hi Micael,

Well, this is exactly why I implemented read-io and write-io. It
allows you to talk to a port using the higher level port facilities
like /lines but still have lower level access. To do what you want, 
try:

>> write-io port "^(01)" 1

That should do the job.

 - jim

At 09:09 PM 10/13/99 +0200, you wrote:
>Does anyone know if it is possible to change the behaviour of a port after
>it has been opened?
>
>I need to send data to a port without CRLF being appended automatically, 
>but I want to receive data row by row using the /lines refinement.
>
>The following example shows the problem:
>
>>> port: open/direct/lines tcp:195.11.11.11:1002
>>> insert port #{0D}        ;Send the access character that starts the
>session
>>> print myinfo: first port ;
>WELCOME
>>> print myinfo: first port ;
>>
>>> insert port #{01}        ;Send the character that will terminate the
>session
>>> print to-binary port/state/outBuffer
>#{010D0A}
>>> close port
>
>Since the refinement /lines is used, #{0D0A} is appended after the
>terminating character #{01}
>Unfortenatley the appended characters opens the my session again... so I
>cannot close the session while the port is using /lines.
>
>I know that I can close the port and reopen it without /lines and then
>insert the #01, however I would prefer not having to open and close the
port
>all the time.
>
>Any ideas would be appreciated!
>
>Brgds /Micael
>
>
>
>

Reply via email to