[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] Re: Random Go Challenge
On 25 March 2004, "Chris Fant" wrote:
> Is anyone doing GTP via stdin/stdout on a windows system and somehow
> connecting that to a remote GTP without using cygwin, etc?
I'm not, but it could be done. Write a socket wrapper class that
presents an ifstream/ofstream interface to the remote machine. Have
your windows program re-assign its stdin/stdout to an instance of the
socket wrapper class. If you want to maintain complete separation
of the socket/stream redirector and the client windows program, you
could put this functionality in a separate program that then spawns
a child process (which is the GTP client app) passing it the new stdin,
etc.
I used to be on a Borland C++Builder mailing list, and handling
redirects of stdin/stdout to acquire/output data to/from a
file/socket/etc. was a fairly common question. You should not have
to use cygwin, and most likely can be done with standard c++ and
wouldn't even require windows API calls (except possibly CreateProcess).
Daniel Hallmark
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go