This repository was archived by the owner on Apr 16, 2018. It is now read-only.
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/socket #19 +/- ##
==================================================
+ Coverage 79.88% 85.53% +5.65%
==================================================
Files 11 12 +1
Lines 835 1051 +216
Branches 82 94 +12
==================================================
+ Hits 667 899 +232
+ Misses 168 152 -16
Continue to review full report at Codecov.
|
agauniyal
suggested changes
Mar 23, 2017
examples/socket_unix_udp_client.cpp
Outdated
| std::string serverPath("/tmp/unixServer"); | ||
|
|
||
| unixClient.bind([&](AddrUnix &s) { | ||
| return methods::construct(s, &clientPath.front()); |
examples/socket_unix_udp_client.cpp
Outdated
| return methods::construct(s, &clientPath.front()); | ||
| }); | ||
|
|
||
| unixClient.connect(&serverPath.front()); |
examples/socket_unix_udp_server.cpp
Outdated
| std::string serverPath("/tmp/unixServer"); | ||
|
|
||
| unixServer.bind([&](AddrUnix &s) { | ||
| return methods::construct(s, &serverPath.front()); |
test/socket_connect_test.cpp
Outdated
| std::thread serverThread1(runUnixServer, std::ref(serverUnixTCP), | ||
| &unixPathServer.front()); | ||
| serverThread1.detach(); | ||
| std::this_thread::sleep_for(2s); |
Member
There was a problem hiding this comment.
try lowering 2s delay if possible.
| EXPECT_ANY_THROW(Socket s(Domain::IPv4, Type::TCP, 41)); | ||
| EXPECT_ANY_THROW(Socket s(Domain::IPv4, Type::UDP, 6)); | ||
|
|
||
| EXPECT_NO_THROW(Socket otherS(Socket(Domain::IPv4, Type::TCP))); |
Contributor
Author
There was a problem hiding this comment.
trying the constructor which takes an rvalue
Member
There was a problem hiding this comment.
@tkhurana96 try with a vector.emplace() kind of method then, which is more practical example.
| void udpIPv6ServerProcessing(Socket &serverSocket) | ||
| { | ||
| const auto res = serverSocket.read(readTest::msgLen); | ||
| EXPECT_EQ(res, readTest::msg); |
test/socket_read_write_test.cpp
Outdated
| Socket unixClient1(Domain::UNIX, Type::TCP); | ||
| EXPECT_EQ(unixClient1.getType(), Type::TCP); | ||
| EXPECT_NO_THROW(unixClient1.bind([&](AddrUnix &s) { | ||
| return methods::construct(s, &readTest::unixClientPath1.front()); |
test/socket_read_write_test.cpp
Outdated
| EXPECT_NO_THROW(unixClient1.bind([&](AddrUnix &s) { | ||
| return methods::construct(s, &readTest::unixClientPath1.front()); | ||
| })); | ||
| EXPECT_NO_THROW(unixClient1.connect(&readTest::unixServerPath1.front())); |
test/socket_read_write_test.cpp
Outdated
| Socket unixClient2(Domain::UNIX, Type::UDP); | ||
| EXPECT_EQ(unixClient2.getType(), Type::UDP); | ||
| EXPECT_NO_THROW(unixClient2.bind([&](AddrUnix &s) { | ||
| return methods::construct(s, &readTest::unixClientPath2.front()); |
test/socket_read_write_test.cpp
Outdated
| EXPECT_NO_THROW(unixClient2.bind([&](AddrUnix &s) { | ||
| return methods::construct(s, &readTest::unixClientPath2.front()); | ||
| })); | ||
| EXPECT_NO_THROW(unixClient2.connect(&readTest::unixServerPath2.front())); |
agauniyal
approved these changes
Mar 24, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.