Displaying 1 result from an estimated 1 matches for "npasscod".
Did you mean:
npasscode
2010 Jun 16
2
Sending a null byte to a socket
...m 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: me\npasscode: pass\n\n\000")
However, R does not like it when you put "\000" in a string:
> "\000"
Error: embedded nul in string: '\0'
I thought perhaps that write.socket would automatically send a null byte,
but it doesn't appear to.
I'm getting similar results...