CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

WSPUDP.H (3439B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /***********************************************************************************************
     17  ***              C O N F I D E N T I A L  ---  W E S T W O O D  S T U D I O S               ***
     18  ***********************************************************************************************
     19  *                                                                                             *
     20  *                 Project Name : Command & Conquer                                            *
     21  *                                                                                             *
     22  *                     $Archive:: /Sun/WSPUDP.h                                               $*
     23  *                                                                                             *
     24  *                      $Author:: Joe_b                                                       $*
     25  *                                                                                             *
     26  *                     $Modtime:: 8/05/97 6:45p                                               $*
     27  *                                                                                             *
     28  *                    $Revision:: 3                                                           $*
     29  *                                                                                             *
     30  *---------------------------------------------------------------------------------------------*
     31  * Functions:                                                                                  *
     32  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
     33 
     34 #ifndef WSPUDP_H
     35 #define WSPUDP_H
     36 
     37 #include	"WSProto.h"
     38 #include	<nspapi.h>
     39 
     40 
     41 
     42 
     43 /*
     44 ** Class to allow access to UDP specific portions of the Winsock interface.
     45 **
     46 */
     47 class UDPInterfaceClass : public WinsockInterfaceClass {
     48 
     49 	public:
     50 
     51 		UDPInterfaceClass (void);
     52 		virtual ~UDPInterfaceClass(void);
     53 
     54 	 	virtual long Message_Handler(HWND window, UINT message, UINT wParam, LONG lParam);
     55 		virtual bool Open_Socket ( SOCKET socketnum );
     56 		virtual void Set_Broadcast_Address ( void *address );
     57 		virtual void Broadcast (void *buffer, int buffer_len);
     58 
     59 		virtual ProtocolEnum Get_Protocol (void) {
     60 			return (PROTOCOL_UDP);
     61 		};
     62 
     63 		virtual int Protocol_Event_Message (void) {
     64 			return (WM_UDPASYNCEVENT);
     65 		};
     66 
     67 
     68 	private:
     69 
     70 		/*
     71 		** Address to use when broadcasting a packet.
     72 		*/
     73 		DynamicVectorClass <unsigned char *> BroadcastAddresses;
     74 
     75 		/*
     76 		** List of local addresses.
     77 		*/
     78 		DynamicVectorClass <unsigned char *> LocalAddresses;
     79 };
     80 
     81 
     82 
     83 #endif