CIpcClientProxy::CIpcClientProxy(synergy::IStream& stream) :
m_stream(stream),
m_clientType(kIpcClientUnknown),
m_disconnecting(false),
m_readMutex(ARCH->newMutex()),
m_writeMutex(ARCH->newMutex())
{
	EVENTQUEUE->adoptHandler(
		m_stream.getInputReadyEvent(), stream.getEventTarget(),
		new TMethodEventJob<CIpcClientProxy>(
		this, &CIpcClientProxy::handleData));

	EVENTQUEUE->adoptHandler(
		m_stream.getOutputErrorEvent(), stream.getEventTarget(),
		new TMethodEventJob<CIpcClientProxy>(
		this, &CIpcClientProxy::handleWriteError));

	EVENTQUEUE->adoptHandler(
		m_stream.getInputShutdownEvent(), stream.getEventTarget(),
		new TMethodEventJob<CIpcClientProxy>(
		this, &CIpcClientProxy::handleDisconnect));

	EVENTQUEUE->adoptHandler(
		m_stream.getOutputShutdownEvent(), stream.getEventTarget(),
		new TMethodEventJob<CIpcClientProxy>(
		this, &CIpcClientProxy::handleWriteError));
}
Exemple #2
0
IpcClientProxy::IpcClientProxy(synergy::IStream& stream, IEventQueue* events) :
	m_stream(stream),
	m_clientType(kIpcClientUnknown),
	m_disconnecting(false),
	m_readMutex(ARCH->newMutex()),
	m_writeMutex(ARCH->newMutex()),
	m_events(events)
{
	m_events->adoptHandler(
		m_events->forIStream().inputReady(), stream.getEventTarget(),
		new TMethodEventJob<IpcClientProxy>(
		this, &IpcClientProxy::handleData));

	m_events->adoptHandler(
		m_events->forIStream().outputError(), stream.getEventTarget(),
		new TMethodEventJob<IpcClientProxy>(
		this, &IpcClientProxy::handleWriteError));

	m_events->adoptHandler(
		m_events->forIStream().inputShutdown(), stream.getEventTarget(),
		new TMethodEventJob<IpcClientProxy>(
		this, &IpcClientProxy::handleDisconnect));

	m_events->adoptHandler(
		m_events->forIStream().outputShutdown(), stream.getEventTarget(),
		new TMethodEventJob<IpcClientProxy>(
		this, &IpcClientProxy::handleWriteError));
}
Exemple #3
0
CIpcServerProxy::CIpcServerProxy(synergy::IStream& stream) :
m_stream(stream)
{
	EVENTQUEUE->adoptHandler(m_stream.getInputReadyEvent(),
		stream.getEventTarget(),
		new TMethodEventJob<CIpcServerProxy>(
		this, &CIpcServerProxy::handleData));
}
CIpcServerProxy::CIpcServerProxy(synergy::IStream& stream, IEventQueue* events) :
	m_stream(stream),
	m_events(events)
{
	m_events->adoptHandler(m_events->forIStream().inputReady(),
		stream.getEventTarget(),
		new TMethodEventJob<CIpcServerProxy>(
		this, &CIpcServerProxy::handleData));
}