Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!freja.diku.dk!rimfaxe.diku.dk!nomann From: nomann@rimfaxe.diku.dk (Ole Nomann Thomsen) Newsgroups: comp.protocols.tcp-ip Subject: socket connection to printer (HELP wanted) Keywords: socket printer Message-ID: <1990Apr9.140256.6848@diku.dk> Date: 9 Apr 90 14:02:56 GMT Sender: news@diku.dk (The Netnews System) Distribution: comp Organization: Department Of Computer Science, University Of Copenhagen Lines: 31 Hello, I need some help on this: Configuration (probably more data than needed here): Xenix 386, Excelan 3.5 Netsoftware CS200 Connectionserver runnning SW/200-TCP-NCS/AT Vers. 3.2 One mannesman laserprinter connected to the former, 9600 Baud, Xon-Xoff. I have a program, that sends to the printer, via the network. It works by connecting a TCP stream socket to a port on a CS200 connection-server, and sending the data throught that. Problem: If I just send the data, and then close down the connection, some data is lost. (Probably the data, that was "in transit" when I closed). This happends _Even_though_ the SIOCGLINGER-ioctl() call returns 0xFFFF, which is supposed to mean that the connection stays open until all data has been acknowledged. Temporary solution: If I execute a sleep(60) (that is sleep one minute, not sleep from man60 :-) before closing the socket, this prevents data-loss _except_ in large and com- plicated printjobs. (I suppose sleep(120) might do the trick then) This is not satisfying, since it forces a one-minute break between print-jobs, and still fails sometimes. Appeal: Can anybody help me on this ? I have read the FM quite a lot of times, and made some experiments, I only post this as a last resort. If you email me the answer, I shall post a summary. Thank you very much. "Very good". - Johan Gambolsputty De Von AusFernSplendenSchlitterCrasCrenBonFriediggerDingleDangleDongleDungleBursteinVonKnackerThrasherAppelbangerHorowitzTicolensicGranderKnottySpelltinklerGrandlichGrumblemeyerSpelterwasserKurstlichHimble EisenBahnWagenGutenabenBitteEineNurnburgerBratwurstleGespurtenMitzWeimachelUberHundsfutGumberaberSchonendankerKalbsFleischMittlerAuche Von Hautkopf of Ulm.