"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "html/muscle-by-example/examples/iogateway/example_2_message_to_tcp.cpp" between
muscle8.20.zip and muscle8.30.zip

About: MUSCLE (Multi User Server Client Linking Environment) is a messaging server and networking API. The included server program ("muscled") lets its clients message each other, and/or store information in its serverside hierarchical database.

example_2_message_to_tcp.cpp  (muscle8.20):example_2_message_to_tcp.cpp  (muscle8.30)
skipping to change at line 97 skipping to change at line 97
} }
printf("\n"); printf("\n");
// Now that we have our connected TCP socket, we'll give it to a TCPSocketDat aIO // Now that we have our connected TCP socket, we'll give it to a TCPSocketDat aIO
// and give the TCPSocketDataIO to our MessageIOGateway. // and give the TCPSocketDataIO to our MessageIOGateway.
TCPSocketDataIO tcpIO(tcpSock, false); // false == set socket to non-blockin g mode! TCPSocketDataIO tcpIO(tcpSock, false); // false == set socket to non-blockin g mode!
MessageIOGateway gateway; MessageIOGateway gateway;
gateway.SetDataIO(DataIORef(&tcpIO, false)); // false == don't delete the po inter! gateway.SetDataIO(DummyDataIORef(tcpIO));
// And we'll use a StdinDataIO to collect stdin input from the user // And we'll use a StdinDataIO to collect stdin input from the user
// (We could use a PlainTextMessageIOGateway in conjunction with it, but for simplicity I won't) // (We could use a PlainTextMessageIOGateway in conjunction with it, but for simplicity I won't)
StdinDataIO stdinIO(true); StdinDataIO stdinIO(true);
printf("Main event loop starting -- you can type a sentence into stdin to sen d a Message to the other session.\n"); printf("Main event loop starting -- you can type a sentence into stdin to sen d a Message to the other session.\n");
printf("\n"); printf("\n");
// Our program's event-loop // Our program's event-loop
SocketMultiplexer sm; SocketMultiplexer sm;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)