"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/portableplaintextclient.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.

portableplaintextclient.cpp  (muscle8.20):portableplaintextclient.cpp  (muscle8.30)
skipping to change at line 36 skipping to change at line 36
if (argc > 1) hostName = argv[1]; if (argc > 1) hostName = argv[1];
if (argc > 2) port = atoi(argv[2]); if (argc > 2) port = atoi(argv[2]);
if (port <= 0) port = 80; if (port <= 0) port = 80;
ConstSocketRef s = Connect(hostName, (uint16)port, "portableplaintextclient", false); ConstSocketRef s = Connect(hostName, (uint16)port, "portableplaintextclient", false);
if (s() == NULL) return 10; if (s() == NULL) return 10;
StdinDataIO stdinIO(false); StdinDataIO stdinIO(false);
QueueGatewayMessageReceiver stdinInQueue; QueueGatewayMessageReceiver stdinInQueue;
PlainTextMessageIOGateway stdinGateway; PlainTextMessageIOGateway stdinGateway;
stdinGateway.SetDataIO(DataIORef(&stdinIO, false)); stdinGateway.SetDataIO(DummyDataIORef(stdinIO));
const int stdinFD = stdinIO.GetReadSelectSocket().GetFileDescriptor(); const int stdinFD = stdinIO.GetReadSelectSocket().GetFileDescriptor();
SocketMultiplexer multiplexer; SocketMultiplexer multiplexer;
PlainTextMessageIOGateway gw; PlainTextMessageIOGateway gw;
gw.SetDataIO(DataIORef(new TCPSocketDataIO(s, false))); gw.SetDataIO(DataIORef(new TCPSocketDataIO(s, false)));
while(s()) while(s())
{ {
const int fd = s.GetFileDescriptor(); const int fd = s.GetFileDescriptor();
multiplexer.RegisterSocketForReadReady(fd); multiplexer.RegisterSocketForReadReady(fd);
if (gw.HasBytesToOutput()) multiplexer.RegisterSocketForWriteReady(fd); if (gw.HasBytesToOutput()) multiplexer.RegisterSocketForWriteReady(fd);
 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)