Skip to content

Commit

Permalink
Adding error checking for nonexistent server in virtual output processor
Browse files Browse the repository at this point in the history
  • Loading branch information
grf14003 committed Feb 4, 2020
1 parent dc5f87d commit 9ddca58
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions breadcrumbs/src/main/VirtualOutputProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@
int main()
{
DataSyncThread client(NULL);
client.connectToAlgorithm("localhost");
client.startComms();

for (int i = 0; i < 10; i++)
if (!client.connectToAlgorithm("localhost"))
{
char testValue = 'a' + i;
Attribute attrib("testKey1", 1, &testValue);
client.sendAttribute(attrib);
}
client.startComms();

client.stopComms();
WSACleanup();
for (int i = 0; i < 10; i++)
{
char testValue = 'a' + i;
Attribute attrib("testKey1", 1, &testValue);
client.sendAttribute(attrib);
}

return 0;
client.stopComms();
WSACleanup();

return 0;
}
return 1;
}

0 comments on commit 9ddca58

Please sign in to comment.