protovision / socketstream Goto Github PK
View Code? Open in Web Editor NEWAn std::iostream derived C++ class for synchronous socket I/O.
An std::iostream derived C++ class for synchronous socket I/O.
socketstream is a header-only library for socket I/O. The following classes are defined: swoope::socketbuf: An std::streambuf derived class that implements a raw socket device. swoope::socketstream: An std::iostream derived class that implements high-level stream input/output on a swoope::socketbuf. socketstream works with POSIX and Windows. Compatible with C++03, move semantics enabled for C++11. Author: Mark Swoope Date: July 2017 Compiling and running the examples: If you are using the Visual C++ compiler, the commands: cl /EHsc server_example.cc ws2_32.lib cl /EHsc client_example.cc ws2_32.lib should compile the example programs when issued from a Developer Command Prompt for VS. If you are using the MinGW compiler, then the commands would be: g++ -D _WIN32 -o server_example.exe server_example.cc -lws2_32 g++ -D _WIN32 -o client_example.exe client_example.cc -lws2_32 For Linux and Mac, the commands are: g++ -o server_example.exe server_example.cc g++ -o client_example.exe client_example.cc (.exe extention is optional for Linux and Mac) After compiling successfully, to test the programs first run: server_example.exe 6789 in one terminal window, then run client_example.exe localhost 6789 In another terminal window and begin entering lines of text into the client terminal window to see the server echo them back.
Hello! I cloned this repo on my Windows 10 laptop, and I tried running the server and client examples, but it doesn't seem to compile. It gives errors from the winsock_native_socket_traits.hh
file, all along the lines of error: '::getaddrinfo' was not declared in this scope
. The same goes for ::freeaddrinfo
and ::getnameinfo
. Is there a way to fix this? Thanks!
Hello! Would you consider adding an explicit license to this class? It is quite nice and I'd love to have explicit permission to actually use it.
May I suggest the Apache license if you don't have a preference.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.