Skip to content

Commit 6c315e9

Browse files
Merge pull request #4 from computersarecool/development
Readme and minor comment update
2 parents f1d6751 + 83f9261 commit 6c315e9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ bin/*
33

44
build/*
55
!build/.gitkeep
6+
.vs/

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ Really this library is not that big of a deal and most sources suggest using a l
1515
- Windows
1616

1717
## To Build
18-
- `simple_cpp_sockets.h` is header-only (just include it in your project).
19-
- To build and run the test application on Linux:
18+
- The library `simple_cpp_sockets.h` is header-only (just include it in your project).
19+
20+
- To build and run the test application on Linux open a terminal and run:
2021
- `cd src`
2122
- `g++ main.cpp -o main`
2223
- `./main`
@@ -29,12 +30,10 @@ Really this library is not that big of a deal and most sources suggest using a l
2930
## Functionality
3031
`main.cpp` is a simple functioning example (not all errors are handled gracefully).
3132

32-
Run the compiled demo application from the command line.
33-
It is a CLI that allows you to interactively make a:
34-
35-
UDP or TCP
33+
The compiled test application is a CLI that allows you to interactively create a:
3634

37-
server or client
35+
- UDP or TCP
36+
- server or client
3837

3938
By asking for:
4039
- protocol
@@ -50,18 +49,18 @@ If server:
5049

5150

5251
## To Use
53-
simple_cpp_sockets.h contains classes for UDP and TCP servers and clients.
52+
`simple_cpp_sockets.h` contains classes for UDP and TCP servers and clients.
5453

5554
An example looks like:
5655
```
5756
UDPServer server(socket_port);
5857
int bind_status = server.socket_bind();
5958
```
60-
Look at main.cpp for the complete needed code.
59+
Look at `main.cpp` for the a complete example.
6160

6261
## Project Structure
6362
- `src/simple_cpp_sockets.h` is the library
64-
- `src/main.cpp` is a simple demo application
63+
- `src/main.cpp` is a demo application
6564

6665
## Extra Notes
6766
- There is [a lot more that could be done](http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html) but this is outside the goals of this project

src/simple_cpp_sockets.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef int SOCKET;
2020
#endif
2121

2222

23-
// Possible errors
23+
// These could also be enums
2424
const int socket_bind_err = 3;
2525
const int socket_accept_err = 4;
2626
const int connection_err = 5;
@@ -87,7 +87,7 @@ class TCPServer : public Socket
8787
Socket::Socket(const SocketType socket_type) : m_socket(), m_addr()
8888
{
8989
#ifdef WIN32
90-
// Initialize the WSDATA if no socket instances exist
90+
// Initialize the WSDATA if no socket instance exists
9191
if(!s_count)
9292
{
9393
WSADATA wsa;

0 commit comments

Comments
 (0)