4 clientlib \- NNTP clientlib part of InterNetNews library
7 .ta \w' unsigned long 'u
8 .B "extern FILE *ser_rd_fp;"
9 .B "extern FILE *ser_wr_fp;"
10 .B "extern char ser_line[];"
13 .B "getserverbyfile(file)"
17 .B "server_init(host)"
21 .B "handle_server_response(response, host)"
30 .B "get_server(buff, buffsize)"
38 The routines described in this manual page are part of the InterNetNews
41 They are replacements for the ``clientlib'' part of the NNTP distribution,
42 and are intended to be used in building programs like
48 to get the name of the local NNTP server.
49 It returns a pointer to static space.
55 opens a connect to the NNTP server at the specified
57 It returns the server's response code or \-1 on error.
58 If a connection was made, then
62 can be used to read from and write to the server, respectively, and
64 will contain the server's response.
66 can also be used in other routines.
68 .I Handle_server_response
71 which comes from the server on
73 If the client is authorized, it returns 0.
74 A client that is only allowed to read is authorized, but
75 .I handle_server_response
76 will print a message on the standard output.
77 If the client is not authorized to talk to the server, then a message is
78 printed and the routine returns \-1.
83 to the server, adding the necessary NNTP line terminators, and flushing
87 reads a line of text from the server into
92 Any trailing \er\en terminators are stripped off.
97 sends a ``quit'' command to the server and closes the connection.
99 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews.
101 This is revision \\$3, dated \\$4.
103 .R$ $Id: clientlib.3 6312 2003-05-04 21:40:11Z rra $