haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] Problem making a program in ghc

Subject: Re: [Haskell-cafe] Problem making a program in ghc
From: "Adam Langley"
Date: Thu, 13 Mar 2008 12:47:15 -0700
2008/3/13 Maverick <maverick_as_2000@xxxxxxxx>:
> I have writed an application that parses xml files and returns a result
> (using HaXml), this is published as a service, I implemented a server
> (withSocketsDo), the server listen the port 5760 in a forever fashion, when
> a message arrives, then the program creates a new thread (forkIO) for attend
> the request. This works fine when I run it from ghci, when I make the
> program and run the binary (in Windows), the requests arrive to the program
> but I think that the response canÂt be sent because the front end canÂt
> receive the response (I am calling the service from a .Net web application),
> I have a log that confirms that the response arrives correctly.

I hate to see any requests for help go unanswered here, but this one
might be tough. I think you need to give some more information,
otherwise the suggestions are going to be very general. Can you put
the Haskell source code on a website somewhere and link to it. Since
it's a network service, an example request and reply might be good to
include.

In general, you should check that you are correctly flushing your
connection. If you are using Handles to interface to the network, they
can buffer the response. hFlush[1] may need to be called when you have
finished generating it.

[1] 
http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#v%3AhFlush

AGL

-- 
Adam Langley agl@xxxxxxxxxxxxxxxxxx http://www.imperialviolet.org
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe
<Prev in Thread] Current Thread [Next in Thread>