Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
1 answer
122 views

Send / receive wrapper for System.Net.Sockets - follow-up

I recently posted a question about improving thread and socket safety in my NetworkEndpoint class. previous post I have implemented the changes suggested in the answer I got there. When I asked for a ...
Tainin's user avatar
  • 113
6 votes
1 answer
386 views

Send / receive wrapper for System.Net.Sockets

The following NetworkEndpoint class serves as a simple send / receive interface for either side of a network connection (client or server) when provided with a ...
Tainin's user avatar
  • 113
3 votes
2 answers
11k views

"Always stay connected" mechanism for socket connection

I'm calling Connect() for the first time I connect, I am then checking if the connection is still connected every 10 seconds if it is not connected it attempts to ...
Josh Hallow's user avatar
  • 1,355
4 votes
2 answers
11k views

Multi threaded TCP server

I wrote this just for fun, to hone my exception handling skills. I want to know what I can do better in terms of exception handling (and otherwise) in the below code Server ...
Parth Mehta's user avatar
30 votes
3 answers
2k views

Java method - levels of abstraction

In his Clean Code book, Robert C. Martin states that functions should do only one thing and one should not mix different levels of abstraction. So I started wondering whether the code below meets ...
cafe_'s user avatar
  • 465
14 votes
4 answers
64k views

Checking if a port is in use

Review this code, which should return true if a port is in use or false if the port is not in use. Clarification: "In use" ...
MadSeb's user avatar
  • 313
2 votes
2 answers
797 views

Wrapper library for sockets

I'm writing a C++ wrapper library for sockets which will hopefully be cross-platform. It's basically two headers: mizaru.hpp, which contains the wrapper classes themselves. trans_layer.hpp, which ...
A. H.'s user avatar
  • 123