IF Computer > MINERVA > Manual > Reference > Predicates > Communication between distributed Minerva processes. > client_stop/1

client_stop/1

MINERVA
ifcomputer logo
f
Expert Services on the Web

Closes a socket connection to a server

client_stop(+Socket)

client_stop/1 terminates a socket connection to a server which has been established with the predicate client_start/3.

Arguments

Socket             object

Examples

main(_) :-
    client_start(localhost, 1352, Socket),
    open(Socket, read, Input, [socket,buffered,binary]),
    open(Socket, write, Output, [socket,buffered,binary]),
    send(Output, some_request),
    receive(Input, Answer),
    handle_answer(Request, Anwer),
    send(Socket, Answer),
    close(Input),
    close(Output),
    client_stop(Socket).

handle_answer(Request, Answer) :- ...

See also

server_start/4, server_stop/1, client_start/3, client_stop/1, listener_start/3, listener_stop/1, send/2, receive/2.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/sockets/client_stop/print_en.html
published 2012/1/30 update 2002/3/19 (c) 1996-2009 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS