1 /*
2  *  R : A Computer Language for Statistical Data Analysis
3  *  Copyright (C) 2012   The R Core Team.
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, a copy is available at
17  *  https://www.R-project.org/Licenses/
18  */
19 
20 #include <R.h>
21 #include <Rinternals.h>
22 
23 /* from src/main/internet.c */
24 SEXP Rdownload(SEXP args);
25 SEXP Rsockconnect(SEXP sport, SEXP shost);
26 SEXP Rsockread(SEXP sport, SEXP smaxlen);
27 SEXP Rsockclose(SEXP sport);
28 SEXP Rsockopen(SEXP sport);
29 SEXP Rsocklisten(SEXP sport);
30 SEXP Rsockwrite(SEXP sport, SEXP sstring);
31 
download(SEXP args)32 SEXP download(SEXP args)
33 {
34     return Rdownload(CDR(args));
35 }
36 
sockconnect(SEXP sport,SEXP shost)37 SEXP sockconnect(SEXP sport, SEXP shost)
38 {
39     return Rsockconnect(sport, shost);
40 }
41 
sockread(SEXP sport,SEXP smaxlen)42 SEXP sockread(SEXP sport, SEXP smaxlen)
43 {
44     return Rsockread(sport, smaxlen);
45 }
46 
sockclose(SEXP sport)47 SEXP sockclose(SEXP sport)
48 {
49     return Rsockclose(sport);
50 }
51 
sockopen(SEXP sport)52 SEXP sockopen(SEXP sport)
53 {
54     return Rsockopen(sport);
55 }
56 
socklisten(SEXP sport)57 SEXP socklisten(SEXP sport)
58 {
59     return Rsocklisten(sport);
60 }
61 
sockwrite(SEXP sport,SEXP sstring)62 SEXP sockwrite(SEXP sport, SEXP sstring)
63 {
64     return Rsockwrite(sport, sstring);
65 }
66