Re: socket programming
- From: Jan Wielemaker <jan@xxxxxxxxxxxxxxxxxxx>
- Date: 18 Sep 2006 07:08:41 GMT
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
.
- References:
- socket programming
- From: Advait
- socket programming
- Prev by Date: Re: Newbie Question: Reading older grammar rule code...
- Next by Date: Re: SWI-Prolog : Constructing Exceptions
- Previous by thread: socket programming
- Next by thread: Answer is 20
- Index(es):