Re: socket programming



On 2006-09-17, Advait <advait_raut@xxxxxxxxxxxxxx> wrote:
Hi

I am newbi in socket programming. I am learning it
with SWI for the simplicity and quick results.
I tried some socket SWI's socket predicates,
during that I met a problem.

I opened two seperate prolog tasks.
Following small codes shows what I wrote in
each task stepwise.
*Note*: 'advait' is my hostname i.e. my compueter itself

%%%%%%%%%%%%% Task 1 %%%%%%%%%%%%%%%%%%%%%%%%%

?- tcp_socket(Sock),tcp_bind(Sock,P). %% Step 1

Sock = '$socket'(252)
P = 1032

You do need to do tcp_listen(Sock, 5) now. Check the manual for the
socket library for complete client and server examples.

--- Jan
.