Subject: Re: [SWIPL] How connect to a server via socket's on Windows

From: "Lesta" <[email-masked]>
Date: Wed, 22 Aug 2001 09:47:58 +0200

----- Original Message -----
From: "Armando Stellato" <[email-masked]>
To: "Lesta" <[email-masked]>
Subject: Re: [SWIPL] How connect to a server via socket's on Windows

> This is probably the error it gives you every second time that you start
the
> program,

No, it appears always

> infact you are creating a socket listener bound to port 5665 and if you
don't
> close the socket at the end of the program, you will find the port
occupied when
> you'll restart it.

The first number after '$socket'( ist increase by 4 each start of the prog.
I am not sure zo have the right way th open the socket in client mode.

Uwe
> > Hello to all of you,
> >
> > I like to build a cliet on a windows2000 machine
> > comunicate via sockets using pl-4.0.9.
> >
> > test:-
> >     tcp_socket(S),
> >     tcp_bind(S,5665),
> >     tcp_open_socket(S, IN, OUT),
> >     ...
> >
> > results in the error msg :
> > ERROR: Unknown error term: socket_error('No such file or directory')
> >    Exception: (8) socket:tcp_bind('$socket'(396), 5665) ?
> > in tcp_bind.
> >
> > Can someone help me, perhaps with a small example ?
> >
> > Thanks in advance
> >
> > --
> >
> > Kind regards
> >
> > Uwe
> > [email-masked]