Subj : WinSock
To   : Jon Justvig
From : Nightfox
Date : Mon Jun 11 2018 10:00 am

 Re: WinSock
 By: Jon Justvig to Digital Man on Mon Jun 11 2018 01:33 am

JJ> Here's my code, trying to output using a socket:

JJ> char c;
JJ> std::fstream myStream("welcome.txt", std::fstream::in);
JJ> while (myStream.get(c))
JJ> {

JJ> send(clientSocket, (const char*)c, size_t(0), 0);
JJ>     std::cout << c;

Where/how is clientSocket declared?  And has it been set up with a valid socket
handle?  That isn't shown in your code snippet.  It looks like this code is
reading from a text file and trying to send each character from the file over a
socket?

Also, did you intend for the "std::cout << c" to be indented?  It doesn't need
to be, as it's not in a separate block of code.

Nightfox

---
� Synchronet � Digital Distortion: digitaldistortionbbs.com