mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
1
This commit is contained in:
40
devtools/smtpmail/simplesocket.h
Normal file
40
devtools/smtpmail/simplesocket.h
Normal file
@@ -0,0 +1,40 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: simple TCP socket API for communicating as a TCP client over a TEXT
|
||||
// connection
|
||||
//
|
||||
// $Workfile: $
|
||||
// $Date: $
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef SIMPLESOCKET_H
|
||||
#define SIMPLESOCKET_H
|
||||
#pragma once
|
||||
|
||||
// opaque socket type
|
||||
typedef struct socket_s socket_t, *HSOCKET;
|
||||
|
||||
// Socket reporting function
|
||||
typedef void ( *REPORTFUNCTION )( HSOCKET socket, const char *pString );
|
||||
|
||||
extern HSOCKET SocketOpen( const char *pServerName, int port );
|
||||
extern void SocketClose( HSOCKET socket );
|
||||
extern void SocketSendString( HSOCKET socket, const char *pString );
|
||||
|
||||
// This should probably return the data so we can handle errors and receive data
|
||||
extern void SocketWait( HSOCKET socket, const char *pString );
|
||||
|
||||
// sets the reporting function
|
||||
extern void SocketReport( REPORTFUNCTION pReportFunction );
|
||||
extern void SocketInit( void );
|
||||
extern void SocketExit( void );
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // SIMPLESOCKET_H
|
||||
Reference in New Issue
Block a user