void AddWorkingSetDeltaMsgReaderAndWriter(
WorkingSetMachine* wsm,
MultiplexedMsgConnection* c,
const WsipcSessionProtocolId& protocolId,
const WsipcHostInfo& localHostInfo)
Performs the following:
The created IMessageWriter/IMessageReader are concerned with supporting interactive collaboration, by sending and receiving working set deltas on the given WorkingSetMachine. The protocol begins with an exchange of siteids and vector times.
It is expected that the peer will call the same function in order to set up their side of the connection.
Assumes the given MultiplexedMsgConnection has been created but OpenConnection() hasn't been called yet. After calling OpenConnection() the client will need to make a single call to NotifyMoreMessagesToWrite() in order to initiate the first outgoing message which is the local siteid and working set vector time.
MultiplexedMsgConnection* CreateWorkingSetConnection(
Iocp* iocp,
WorkingSetMachine* wsm,
boost::asio::ip::tcp::socket* s,
const WsipcSessionProtocolId& protocolId,
const WsipcHostInfo& localHostInfo,
const MessageReaderSettings& readerSettings,
const MessageWriterSettings& writerSettings)
Creates and sets up a MultiplexedMsgConnection to allow interactive collaboration on the given WorkingSetMachine.
This is a convenience function that is only appropriate if multiplexing of messages for multiple purposes isn't required.
$function+ MServer* CreateWsipcServer(
Iocp* iocp,
WorkingSetMachine* wsm,
const WsipcSessionProtocolId& protocolId,
const WsipcHostInfo& localHostInfo,
SOCKET_PORT port,
const TcpSettings& tcpSettings = TcpSettings())
There is no constraint on the number of servers that may be created for a given WorkingSet.
Create a server that listens on the given port
Returns NULL if server could not be created. A more specific windows error can be obtained with a call to GetLastError().
$function+ MClient* CreateWsipcClient(
Iocp* iocp,
WorkingSetMachine* wsm,
const WsipcSessionProtocolId& protocolId,
ConstStringZ hostname,
SOCKET_PORT port,
const TcpSettings& tcpSettings = TcpSettings())
There is no constraint on the number of clients that may be created for a given WorkingSet.
Create a client that tries to connect to the given host that is listening on the given port