Re: [R] Sending a null byte to a socket

2010-06-24 Thread Dan Tenenbaum
Sorry to spam the list again, but I was wondering if anyone has a solution to this. It seems that writing nulls to sockets is a pretty common use case, so I would hope there is a way to do this. Thanks. On Wed, Jun 16, 2010 at 12:52 PM, Dan Tenenbaum dtenenb...@systemsbiology.org wrote: Hello,

Re: [R] Sending a null byte to a socket

2010-06-24 Thread Dan Tenenbaum
OK, I figured this out: s - CONNECT\n\n con - socketConnection(port=61613, blocking=F) writeChar(s, con, nchar(s)) r = readLines(con) r [1] CONNECTED session:ID:yourhost.yourdomain.com-49763-1276709732624-4:28 [4] close(con) Thanks Dan On Wed, Jun 16, 2010 at 12:52 PM, Dan Tenenbaum

[R] Sending a null byte to a socket

2010-06-16 Thread Dan Tenenbaum
Hello, I am trying to write some code in R to communicate over sockets via the STOMP protocol (http://stomp.codehaus.org/Protocol). As you can see, a null byte (ASCII 0) is used as the over signal. I'd like to be able to do something like this: write.socket(socket, CONNECT\nlogin: