Hi,
I am trying to open a named pipe connection on Windows 7 and it is not working. Please help.
serverPipe <- pipe("\\\\.\\pipe\\mserver", open = 'r', "UTF-16")
if (serverPipe)
{
print(serverPipe)
str(serverPipe)
message <- ""
while(TRUE)
{
Sys.sleep(1)
message <- readLines(serverPipe)
if(length(message)) print(message)
if(all(message == "client closing"))
{
close(serverPipe)
}
}
}
#> A connection with
#> description "\\\\.\\pipe\\mserver"
#> class "pipe"
#> mode "r"
#> text "text"
#> opened "opened"
#> can read "yes"
#> can write "no"
#> 'pipe' int 4
#> - attr(*, "conn_id")=<externalptr>
#> Warning in readLines(serverPipe): line 1 appears to contain an embedded nul
#> Error in readLines(serverPipe): invalid connection
Created on 2019-05-27 by the reprex package (v0.3.0)