The R Project SVN R

Rev

Rev 16597 | Rev 32380 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16597 Rev 26380
Line 51... Line 51...
51
void Rsockconnect(int *port, char **host)
51
void Rsockconnect(int *port, char **host)
52
void Rsockclose(int *sockp)
52
void Rsockclose(int *sockp)
53
void Rsockread(int *sockp, char **buf, int *maxlen)
53
void Rsockread(int *sockp, char **buf, int *maxlen)
54
void Rsockwrite(int *sockp, char **buf, int *start, int *end, int *len)
54
void Rsockwrite(int *sockp, char **buf, int *start, int *end, int *len)
55
 
55
 
-
 
56
int Rsockselect(int nsock, int *insockfd, int *ready, int *write,
-
 
57
                double timeout)
56
 */
58
 */
57
 
59
 
58
static int initialized = 0;
60
static int initialized = 0;
59
 
61
 
60
R_InternetRoutines *
62
R_InternetRoutines *
Line 232... Line 234...
232
    if(initialized > 0)
234
    if(initialized > 0)
233
	(*ptr->sockwrite)(sockp, buf, start, end, len);
235
	(*ptr->sockwrite)(sockp, buf, start, end, len);
234
    else
236
    else
235
	error("socket routines cannot be loaded");
237
	error("socket routines cannot be loaded");
236
}
238
}
-
 
239
 
-
 
240
int Rsockselect(int nsock, int *insockfd, int *ready, int *write,
-
 
241
		double timeout)
-
 
242
{
-
 
243
    if(!initialized) internet_Init();
-
 
244
    if(initialized > 0)
-
 
245
	return (*ptr->sockselect)(nsock, insockfd, ready, write, timeout);
-
 
246
    else {
-
 
247
	error("socket routines cannot be loaded");
-
 
248
	return 0;
-
 
249
    }
-
 
250
}
-
 
251