Bug 804436 - Patch 1 : Add listening status to UnixSocket, r=gyeh

This commit is contained in:
Gina Yeh 2012-10-26 17:28:34 +08:00
parent a3f7f89a1e
commit 0b1f5c036d
2 changed files with 4 additions and 3 deletions

View File

@ -778,7 +778,7 @@ UnixSocketConsumer::ListenSocket(UnixSocketConnector* aConnector)
mImpl = new UnixSocketImpl(this, aConnector, addr); mImpl = new UnixSocketImpl(this, aConnector, addr);
XRE_GetIOMessageLoop()->PostTask(FROM_HERE, XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
new SocketAcceptTask(mImpl)); new SocketAcceptTask(mImpl));
mConnectionStatus = SOCKET_CONNECTING; mConnectionStatus = SOCKET_LISTENING;
return true; return true;
} }

View File

@ -116,8 +116,9 @@ public:
enum SocketConnectionStatus { enum SocketConnectionStatus {
SOCKET_DISCONNECTED = 0, SOCKET_DISCONNECTED = 0,
SOCKET_CONNECTING = 1, SOCKET_LISTENING = 1,
SOCKET_CONNECTED = 2 SOCKET_CONNECTING = 2,
SOCKET_CONNECTED = 3
}; };
class UnixSocketConsumer : public RefCounted<UnixSocketConsumer> class UnixSocketConsumer : public RefCounted<UnixSocketConsumer>