Re: WinSock
By: Jon Justvig to Digital Man on Tue Jun 12 2018 01:13 am
> Re: WinSock
> By: Digital Man to Jon Justvig on Sat Jun 09 2018 08:08 pm
>
> DM,
>
> Okay, I figured out send() just fine. I'm having major issues with recv().
> Right now, I can only get it to input one character, even with char arrays
> or strings. Here's a sample:
>
> int result;
>
> // our recv loop
> while (true)
> {
>
> result = recv(current_client, buffer, sizeof(buffer), 0); // recv cmds
>
> Sleep(10);
>
> if (result > 0)
> {
> cout << "\n\tMessage from client: " << buffer;
> send(current_client, (const char*)buffer, sizeof(buffer), 0);
> }
Where is the definition of 'buffer'?
digital man
Synchronet "Real Fact" #75:
Rob's alias "digital man" was inspired by a song on Rush's 1982 "Signals" album.
Norco, CA WX: 82.9°F, 38.0% humidity, 8 mph NNE wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
|