Skip to content
Snippets Groups Projects
Select Git revision
  • 8e66ed73ab2371e89a548344e4ad26139e7d5db2
  • next default protected
  • sdl3
  • fixithreads
  • software-optimizations
  • lift-freeslot-limits-2
  • lift-maxsend-limits
  • add-forth-interpreter
  • close-connection-timeout
  • lift-netxcmd-limits
  • add-textinput-hook
  • add-namechange-lua-hook
  • inline-mobjwasremoved
  • fix-bot-2pai-desync
  • avoid-double-checkmobjtrigger-call
  • remove-scale-deadcode
  • remove-duplicate-mobjthinker-call
  • master
  • ensure-ackpak-response
  • fix-acknum-not-incrementing
  • fix-unack-lockup
  • SRB2_release_2.2.10
  • SRB2_release_2.2.9
  • SRB2_release_2.2.8
  • SRB2_release_2.2.7
  • SRB2_release_2.2.6
  • SRB2_release_2.2.5
  • SRB2_release_2.2.4
  • SRB2_release_2.2.3
  • SRB2_release_2.2.2
  • SRB2_release_2.2.1
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
  • SRB2_release_2.1.20
  • SRB2_release_2.1.19
  • SRB2_release_2.1.18
  • td-release-v1.0.0
41 results

make-macos-universal.sh

Blame
  • Forked from STJr / SRB2
    Source project has a limited visibility.
    i_net.h 3.05 KiB
    // SONIC ROBO BLAST 2
    //-----------------------------------------------------------------------------
    // Copyright (C) 1993-1996 by id Software, Inc.
    // Copyright (C) 1998-2000 by DooM Legacy Team.
    // Copyright (C) 1999-2024 by Sonic Team Junior.
    //
    // This program is free software distributed under the
    // terms of the GNU General Public License, version 2.
    // See the 'LICENSE' file for more details.
    //-----------------------------------------------------------------------------
    /// \file  i_net.h
    /// \brief System specific network interface stuff.
    
    #ifndef __I_NET__
    #define __I_NET__
    
    #ifdef __GNUG__
    #pragma interface
    #endif
    
    #include "../doomdef.h"
    #include "../command.h"
    
    /// \brief program net id
    #define DOOMCOM_ID (INT32)0x12345678l
    
    /// \def MAXPACKETLENGTH
    /// For use in a LAN
    #define MAXPACKETLENGTH 1450
    /// \def INETPACKETLENGTH
    ///  For use on the internet
    #define INETPACKETLENGTH 1024
    
    extern INT16 hardware_MAXPACKETLENGTH;
    
    #if defined(_MSC_VER)
    #pragma pack(1)
    #endif
    
    typedef struct
    {
    	/// Is dest for send, set by get (-1 = no packet).
    	INT16 remotenode;
    	/// Number of bytes in doomdata to be sent
    	INT16 datalength;
    
    	/// The packet data to be sent.
    	char data[MAXPACKETLENGTH];
    } ATTRPACK doomcom_t;
    
    #if defined(_MSC_VER)
    #pragma pack()
    #endif
    
    /** \brief Number of connected nodes.
    */
    extern INT16 numnetnodes;
    
    /** \brief Number of "slots": the highest player number in use plus one.
    */
    extern INT16 numslots;
    
    /** \brief Flag: 1 = send a backup tic in every packet.
    */
    extern INT16 extratics;
    
    extern doomcom_t *doomcom;
    
    /**	\brief return packet in doomcom struct
    */
    extern boolean (*I_NetGet)(void);
    
    /**	\brief send packet within doomcom struct
    */
    extern void (*I_NetSend)(void);
    
    /**	\brief	close a connection
    
    	\param	nodenum	node to be closed
    
    	\return	void
    
    
    */
    extern void (*I_NetFreeNodenum)(INT32 nodenum);
    
    /**
    	\brief	split a string into address and port
    
    	\param	address	string to split
    
    	\param	port	double pointer to hold port component (optional)
    
    	\return	address component
    */
    extern char *I_NetSplitAddress(char *address, char **port);
    
    /**	\brief	open a connection with specified address
    
    	\param	address	address to connect to
    
    	\return	number of node
    
    
    */
    extern SINT8 I_NetMakeNode(const char *address);
    
    /**	\brief	open a connection with specified address and port
    
    	\param	address	address to connect to
    
    	\param	port	port to connect to
    
    	\return	number of node
    
    
    */
    extern SINT8 (*I_NetMakeNodewPort)(const char *address, const char *port);
    
    /**	\brief open connection
    */
    extern boolean (*I_NetOpenSocket)(void);
    
    /**	\brief close all connections no more allow geting any packet
    */
    extern void (*I_NetCloseSocket)(void);
    
    
    extern boolean (*I_Ban) (INT32 node);
    extern void (*I_ClearBans)(void);
    extern const char *(*I_GetNodeAddress) (INT32 node);
    extern const char *(*I_GetBanAddress) (size_t ban);
    extern const char *(*I_GetBanMask) (size_t ban);
    extern boolean (*I_SetBanAddress) (const char *address,const char *mask);
    extern boolean *bannednode;
    
    /// \brief Called by D_SRB2Main to be defined by extern network driver
    boolean I_InitNetwork(void);
    
    #endif