So I've been trying to build a function that sends 1 string to a webserver and then gets a differant string back from the webserver using a socket connection. Given how this site apparently mutes you temporarily based on if users down vote your questions(real smart site there right?) I was forced to go to cplusplus.com for help in this. Somebody suggested over there to use LibCurl instead.
Here's where my issue begins, libcurl apparently functions in async, which basically is causing my stuff to break. not only that but libcurl apparently isn't meant for what I'm trying to do. So I opted back for using sockets again and I'm stuck with the same issue as before. The major issue being that windows sockets and linux sockets apparently require a differant library for each OS type, this is really starting to become a pain as most examples for winsock aren't really giving me what I need in order to just send a string and wait for the response before continueing. Alot aren't even showing how to setup the whole thing with SSL either. On top of this, just one OSs worth of this is already becoming really annoying to deal with trying to figure out but then I'd also need to build a linux version so I'm eventually going to have to do all the same headaches again for linux.
Does anybody know of a wrapper/library for sockets that works on both windows AND linux without needing to change anything in an app to work right? Preferably one that doesn't have garbage docs like LibCurl or Crypto++, that way actually using the docs is helpful for once instead of a waste of time.
Aucun commentaire:
Enregistrer un commentaire