The R Project SVN R

Rev

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

Rev 60704 Rev 60790
Line 316... Line 316...
316
SEXP Rsockwrite(SEXP ssock, SEXP sstring)
316
SEXP Rsockwrite(SEXP ssock, SEXP sstring)
317
{
317
{
318
    if (length(ssock) != 1) error("invalid 'socket' argument");
318
    if (length(ssock) != 1) error("invalid 'socket' argument");
319
    int sock = asInteger(ssock), start = 0, end, len;
319
    int sock = asInteger(ssock), start = 0, end, len;
320
    char *buf = (char *) translateChar(STRING_ELT(sstring, 0)), *abuf[1];
320
    char *buf = (char *) translateChar(STRING_ELT(sstring, 0)), *abuf[1];
321
    end = len = strlen(buf);
321
    end = len = (int) strlen(buf);
322
    abuf[0] = buf;
322
    abuf[0] = buf;
323
    if(!initialized) internet_Init();
323
    if(!initialized) internet_Init();
324
    if(initialized > 0)
324
    if(initialized > 0)
325
	(*ptr->sockwrite)(&sock, abuf, &start, &end, &len);
325
	(*ptr->sockwrite)(&sock, abuf, &start, &end, &len);
326
    else
326
    else