Added support for sockets pretending to not be sockets even though they are really sockets. Sockets.
This commit is contained in:
parent
b8a5196a89
commit
9d34ad7f5b
1 changed files with 4 additions and 2 deletions
|
@ -515,9 +515,11 @@ int Socket::Connection::iread(void * buffer, int len, int flags) {
|
||||||
if (sock >= 0) {
|
if (sock >= 0) {
|
||||||
r = recv(sock, buffer, len, flags);
|
r = recv(sock, buffer, len, flags);
|
||||||
} else {
|
} else {
|
||||||
//(pipes[1] >=0) {
|
r = recv(pipes[1], buffer, len, flags);
|
||||||
|
if (r < 0 && errno == ENOTSOCK){
|
||||||
r = read(pipes[1], buffer, len);
|
r = read(pipes[1], buffer, len);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
switch (errno) {
|
switch (errno) {
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
|
|
Loading…
Add table
Reference in a new issue