Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualTispe

Posted 08 October 2013 - 01:50 PM

Thanks all for the input. I have encapsulated Enet in my own working class with this interface.

	bool Connect(char* Name, char* HostName, unsigned short port);
	void Disconnect();
	DWORD GetStatus();
	bool Tick(ENetEvent* RecvPacket);
	void Send(EnetBaseMessage *message);
	void FlushPackets();
	const char* GetUserName();
	ENetPeer* GetPeer();

Tick() returns true if there is a packet, this is how I "while(tick(&packet))" the incoming packets from. I can also inject to the packet information such as "disconnected".

 

The ping info inside the peer is 15ms higher then I get from normal pinging the server. The incomingDataTotal and outgoingDataTotal makes no sense.


#1Tispe

Posted 08 October 2013 - 01:44 PM

Thanks all for the input. I have encapsulated Enet in my own working class with this interface.

	bool init(char* Name);
	bool Connect(char* Name, char* HostName, unsigned short port);
	void Disconnect();
	DWORD GetStatus();
	bool Tick(ENetEvent* RecvPacket);
	void Send(EnetBaseMessage *message);
	void FlushPackets();
	const char* GetUserName();
	ENetPeer* GetPeer();

Tick() returns true if there is a packet, this is how I "while(tick(&packet))" the incoming packets from. I can also inject to the packet information such as "disconnected".

 

The ping info inside the peer is 15ms higher then I get from normal pinging the server. The incomingDataTotal and outgoingDataTotal makes no sense.


PARTNERS