delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/23/09:32:33.1

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Making an app block & flush stdout.
Date: Sun, 23 Sep 2001 14:02:51 +0100
Lines: 35
Message-ID: <3BADDD7B.D1C64A55@phekda.freeserve.co.uk>
References: <3BA54CA1 DOT 1CF5C563 AT worldnet DOT att DOT net>
NNTP-Posting-Host: modem-90.carbon.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news8.svr.pol.co.uk 1001251079 12008 62.136.5.90 (23 Sep 2001 13:17:59 GMT)
NNTP-Posting-Date: 23 Sep 2001 13:17:59 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Les Cargill wrote:
> Is there some means of causing a console app to block ( with respect to
> Windows ) and flush the output?

Are you writing a Windows console program or a DOS program?

> I have a program suite which uses a Tcl GUI ( since it's pretty easy )
> as a "client", and a 'C'-written  "server" which spits out text via
> stdout using printf/puts/the usual suspects.
> 
> DOS , of course, uses temp files for pipes. I was sorta hoping there
> was some way to cause stdin/stdout to act more like Uniz pipes/sockets.
> 
> I can use sockets. I figure that's the answer. If so, does the person
> running the app have to have Winsock, or TCP/IP on the machine to run
> this program, or will the Tcl  and DJGPP socket layers "find" each
> other? I know the answer in Solaris/SunOS4/Linux/ contexts...

Windows does not provide support for Unix domain sockets AFAIK. So you
will have to use Internet domain sockets, which means you need to have
Winsock with support for TCP/IP installed.

See part of section 22 of the DJGPP FAQ for a list of networking libraries
for DJGPP. You might be better off writing your program with a tool such
as Cygwin, which will integrate better with your Windows program in this
case. The networking libraries for DJGPP don't work very well with
versions of Windows later than '98.

HTH, bye,

-- 
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019