[REBOL] Re: Understanding tcp
From: patrick:philipot:laposte at: 16-Aug-2003 12:28
Hi Maarten, Gabriele, and Norman
Thanks to you, it works now.
I needed the open/no-wait !
So now, I am trying to put all this in a 'scheme.
It works pretty well but for the no-wait part.
The scheme is very short:
make root-protocol [
open: func [port [port!] /local connection-string][
port/sub-port/state/flags: 524835 ; force /direct/binary mode
if not none? port/target [ append connection-string join "DSN="
port/target ";" ] ]
if not none? port/user [ append connection-string join "UID="
port/user ";" ] ]
if not none? port/pass [ append connection-string join "PWD="
port/pass ";" ] ]
insert port connection-string
insert: function [ port data ] [ ] [
system/words/insert port/sub-port data
copy: func [ port ] [
make string! system/words/copy port/sub-port
net-utils/net-install dbtcp self 3000
The test program is very short too.
db: open dbtcp://localhost/mytest
insert db rejoin ["^(05)^(00)^(17)^(00)^(00)^(02)" "select * from mytable"
insert db "^(05)^(00)^(0B)^(00)^(00)^(06)FetchRecord"
print mold copy db ; <<<<<<<<<<<<<< TIMEOUT ERROR
I can tell that all this work pretty well because tcpview shows a correct
The server is receiving and sending its data.
However, as before, I am not in no-wait mode.
And so the copy fails.
I have looked deeply in the code of all existing protocols but found
Does anybody have a clue?