Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Foran/networklint
Networklint
- Loading branch information
Showing
8 changed files
with
261 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,40 @@ | ||
/**************************************************** | ||
* This work is licensed under the Creative | ||
* Commons Attribution-NonCommercial-ShareAlike | ||
* 3.0 Unported License. To view a copy of this | ||
* license, visit | ||
* http://creativecommons.org/licenses/by-nc-sa/3.0/ | ||
* or send a letter to Creative Commons, 444 | ||
* Castro Street, Suite 900, Mountain View, | ||
* California, 94041, USA. | ||
* Copyright 2018 Ben M. Ward | ||
* | ||
* This work is licensed under the Creative | ||
* Commons Attribution-NonCommercial-ShareAlike | ||
* 3.0 Unported License. To view a copy of this | ||
* license, visit | ||
* http://creativecommons.org/licenses/by-nc-sa/3.0/ | ||
* or send a letter to Creative Commons, 444 | ||
* Castro Street, Suite 900, Mountain View, | ||
* California, 94041, USA. | ||
***************************************************/ | ||
#include "packets.h" | ||
#include "src/lib/network/packets.h" | ||
|
||
void CPacket_Request_Game_Info_Lite::Send(int socket, const struct sockaddr_in &addr) | ||
{ | ||
PACKET_Request_Game_Info_Lite packet; | ||
packet.Type = UPID_GAME_INFO_LITE_REQ; | ||
packet.Request_ID = 0x52583144; | ||
packet.Major = 0; | ||
packet.Minor = 56; | ||
packet.Micro = 0; | ||
sendto(socket, (char *)&packet, sizeof(packet), 0, (const struct sockaddr *)&addr, sizeof(addr)); | ||
int err = errno; | ||
cout << strerror(err) << endl; | ||
using ::std::cout; | ||
using ::std::endl; | ||
|
||
namespace DESCENT_BOT { | ||
namespace SRC { | ||
namespace LIB { | ||
namespace NETWORK { | ||
|
||
void CPacket_Request_Game_Info_Lite::Send(int socket, | ||
const struct sockaddr_in &addr) { | ||
PACKET_Request_Game_Info_Lite packet; | ||
packet.Type = UPID_GAME_INFO_LITE_REQ; | ||
packet.Request_ID = 0x52583144; | ||
packet.Major = 0; | ||
packet.Minor = 56; | ||
packet.Micro = 0; | ||
sendto(socket, reinterpret_cast<char *>(&packet), sizeof(packet), 0, | ||
(const struct sockaddr *)&addr, sizeof(addr)); | ||
int err = errno; | ||
cout << strerror(err) << endl; | ||
} | ||
|
||
} // namespace NETWORK | ||
} // namespace LIB | ||
} // namespace SRC | ||
} // namespace DESCENT_BOT |
Oops, something went wrong.