Skip to content

Instantly share code, notes, and snippets.

@etosch
Created March 9, 2013 01:11
Show Gist options
  • Save etosch/5121922 to your computer and use it in GitHub Desktop.
Save etosch/5121922 to your computer and use it in GitHub Desktop.
Sample code for how to use simplesocket.cc
#include "simplesocket.h"
int main(int argc, char * argv[]){
int port;
stringstream(argv[1]) >> port;
clientsocket * s = new clientsocket("localhost", port);
printf("3:%d\n", s->connect());
s->write("asdf", 256);
s->close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment