Hi all,
There seems to be a bug in the line buffering of TCP sockets when using the
Win32 version of GProlog. Look at this example code:
% Define socket
socket('AF_INET', Socket),
% Try to connect
socket_connect(Socket, 'AF_INET'(localhost, 40000), In, Out),
% Put the buffering to line-based
set_stream_buffering(Out, line),
% Write something to the socket
write(Out, 'Hello'), nl(Out), read_token(In, _).
=====================
This works perfect in Linux. However, when using the Win32 version of GProlog,
the 'other side' keeps waiting for a CR after the 'Hello' is sent, in spite of
the "nl(Out)".
This was my test environment:
Gnu Prolog 1.2.16 compiled on Slackware 9.1 kernel 2.4.22
Gnu Prolog 1.2.16 used on Windows2000 SP 1.
Regards
Peter.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.