Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-01
01:48 • Ticket [218331ffff] Communication puts/gets (gets -eol char) status still Cl... artifact: d2c517c031 user: dgp
2000-10-26
08:20 • Closed ticket [218331ffff]. artifact: 3ee9afdac7 user: welch
00:56 • New ticket [218331ffff]. artifact: 414be43fcc user: nobody

Communication puts/gets (gets -eol char)

Closed / Fixed218331ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:18
OriginalBugID: 3924 RFE
Version: 8.1
SubmitDate: '1999-12-22'
LastModified: '2000-04-03'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Linux-SuSE
Machine: Linux / Sun-Solaris
FixedDate: '2000-10-25'
ClosedDate: '2000-04-03'


Name:
Andreas Otto

DesiredBehavior:
I use a client-server system which connect over the network.
I use "puts $FileIO $List" to send an tcl list over the network and "gets $FileIO List" to receive the list.
If insight the List are strings with "newline" chars, the single "puts" produces many "gets" on the other side.
This is not GOOD !!!! 
because i expect a valid tcl list, but with " newline" insight the list you get something 
like "{..<newline>"  "..}" as 2 single "gets"
An easy solution would be:
 extend the "fconfigure" command with something like similar to the "-translation" switch,
where you can choose the "end of line" char.



It's unlikely that this would ever be done, because it is counter
to the whole basis of 'gets' (that it reads until newline), just
like the C counterpart.  The same would happen in C.  The common
solution it to regsub the \n's before sending the data across. 
-- 01/10/2000 hobbs
This would require a patch to be considered.  A simple protocol
would be best served here (one gets to tell you to read the
next N chars). 
-- 04/03/2000 hobbs
welch Closed ticket [218331ffff]. [History diff]2000-10-26 08:20:06
dgp Ticket [218331ffff]: 3 changes [History diff]2001-04-01 01:48:01
Log in (anonymous is fine) to add a comment.