Inspiration

Often, we have to send a packet of data to another computer/program. We usually use the built in socket library for this, but it's not always easy to use and can be complicated. We decided to build our own wrapper that does the gritty work for us.
Other libraries we looked for on the Python Package Index were either old and outdated, or didn't have sufficient documentation to be useful.

What it does

SimpleSockets acts as a wrapper for Python's built in socket library. It handles setting up sockets, managing connections, and sending packets. It also supports custom encoding methods (although it defaults to UTF-8).

How we built it

We built it all in Python. We used Visual Studio's Live Share feature so that we could both work on the project without having to deal with git conflicts. When we were done with a specific feature, then we'd push to the repository.

Challenges we ran into

We ran into a lot of challenges initially. The first problem we came across was that our connections were denied. It took half an hour for us to realize that socket doesn't like localhost.
The second problem we encountered was with receiving packets. At first we had some threading hackery so we wouldn't break the main thread while it was waiting for connections. After an hour of running the debugger, we fixed it.
We had a few more incidences where stuff would break, but most of it was because we were inexperienced with both the socket library and how to actually make a library.

Accomplishments that we're proud of

We're proud of creating the library. We've never done anything like this, so it was difficult to get it working.
We're also happy to have learned about the socket library more. Even though it's still complicated to use, it's a little easier to understand now.

What we learned

We learned more about the socket library, and how to write a library. We learned all of the necessary components for sending messages between devices.

What's next for SimpleSockets

Next, we're looking to implement support for encryption. We're also considering adding support for other data types, such as dictionaries, lists, and tuples (Right now we have integers, booleans, and strings).

Built With

Share this project:

Updates