Subj : WinSock
To   : Jon Justvig
From : Digital Man
Date : Sat Jun 09 2018 08:08 pm

 Re: WinSock
 By: Jon Justvig to All on Sat Jun 09 2018 01:29 pm

> Hi all...
>
> I am looking for examples of how to create a WinSock server.  I would like
> for a telnet client to connect to the server.  The server first displays
> text and provides a prompt for user input from the client.  Can someone
> guide me in the right direction or provide a piece of code I can work with?
> I've googled until my guts fall out.  I am building on a Win32 platform
> using Visual C++ Studio Community 2017.

Here's a sample:

https://www.tutorialspoint.com/unix_sockets/socket_server_example.htm

It's generic socket example, but it's mostly relevant to WinSock. With Windows
(and WinSock) you can't treat socket handles as file descriptors, so you'll
have to replace the call to read() with recv() and replace write() with send().

There's a similar WinSock-specific example on this page from Microsoft:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx

                                           digital man

This Is Spinal Tap quote #40:
Morty the Mime: Come on, don't talk back, mime is money, come on, move it.
Norco, CA WX: 73.2�F, 52.0% humidity, 10 mph ENE wind, 0.00 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net