[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] how to use GTP in place of GMP
Don Dailey <drd@xxxxxxxxxxxxxxxxx> writes:
> There is a telnet windows program, but there is no simple way to
> listen for telnet.
>
I was trying to decide whether to join in here...
(it is of very easy for windows to listen for telnet - just bind to port 23.
The problem is logging in a session. cygwin provides a telnetd BTW
)
However, there's no need to actually log in (telnet, rsh, ssh, etc) to
do any of this.
All you need to do is have a daemon process running, listening for
connections on a port, and spawning off a copy of the program.
inetd would do it on unix (or windows with cygwin). But you can just
as easily leave a console window running on a windows desktop with a
listener.
netcat is good for this sort of plumbing. (I use my own perl
implementation, but the standard c one is similar).
Eg in a cygwin shell on my windows machine:
$ perl netcat 12345 gnugo --mode gtp
which waits for an incoming connection on port 12345, then when it
gets a connection, binds the socket to stdin/stdout and execs gnugo.
(I think standard netcat uses -e to give the program to exec)
Then on my solaris box :
$ echo help | netcat server:12345
connects me to that port, sends a line 'help' and gets back gnugo's output.
(I can also use telnet client to connect to port 12345 on that machine.)
dd
--
Dave Denholm <ddenholm@xxxxxxxxxxxxxxxxx> http://www.esmertec.com
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/