Skip to content

Instantly share code, notes, and snippets.

View ianfun's full-sized avatar

ianfun ianfun

View GitHub Profile
@bitnenfer
bitnenfer / websocket-server-winsock.cpp
Created December 29, 2016 05:02
WebSocket Server using WinSock2 and gaius engine.
void socket_run(void*)
{
//addrinfo hints;
//addrinfo* result = NULL;
//addrinfo* pointer = NULL;
uint32 success = 0;
SOCKET listen_socket = INVALID_SOCKET;
SOCKET client_socket = INVALID_SOCKET;
WSADATA wsa_data;
@odzhan
odzhan / tlsclient.cpp
Created June 7, 2022 00:06
C++ SSPI Schannel TLS example
// Compiles with Visual Studio 2008 for Windows
// This C example is designed as more of a guide than a library to be plugged into an application
// That module required a couple of major re-writes and is available upon request
// The Basic example has tips to the direction you should take
// This will work with connections on port 587 that upgrade a plain text session to an encrypted session with STARTTLS as covered here.
// TLSclient.c - SSPI Schannel gmail TLS connection example
#define SECURITY_WIN32