Removed incomplete project stubs
This commit is contained in:
parent
31e9cfe2a5
commit
0561156813
|
|
@ -1,43 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Basic window
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
InitWindow(
|
||||
screenWidth, screenHeight, "raylib [core] example - basic window");
|
||||
SetTargetFPS(60);
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
CloseWindow();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Basic window
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
InitWindow(
|
||||
screenWidth, screenHeight, "raylib [core] example - basic window");
|
||||
SetTargetFPS(60);
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
CloseWindow();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [network] example - Resolve host
|
||||
* raylib [network] example - Resolve Host
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [core] example - Basic window
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 1.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
InitWindow(
|
||||
screenWidth, screenHeight, "raylib [core] example - basic window");
|
||||
SetTargetFPS(60);
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
CloseWindow();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,3 +1,25 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [network] example - TCP Client
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 2.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h
|
||||
*for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "rnet.c"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,25 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [network] example - TCP Server
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 2.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h
|
||||
*for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
#include "rnet.c"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,25 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [network] example - Network Test
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 2.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h
|
||||
*for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
|
@ -71,7 +93,7 @@ void test_resolve_host()
|
|||
const char * address = "localhost";
|
||||
const char * port = "80";
|
||||
AddressInformation *addr = AllocAddressList(3);
|
||||
int count = ResolveHost(address, port, ADDRESS_TYPE_IPV4, 0, addr);
|
||||
int count = ResolveHost(address, port, ADDRESS_TYPE_ANY, 0, addr);
|
||||
|
||||
assert(GetAddressFamily(addr[0]) == ADDRESS_TYPE_IPV6);
|
||||
assert(GetAddressFamily(addr[1]) == ADDRESS_TYPE_IPV4);
|
||||
|
|
@ -109,8 +131,8 @@ int main()
|
|||
|
||||
// Run the tests
|
||||
test_network_initialise();
|
||||
// test_resolve_host();
|
||||
test_socket_create();
|
||||
test_resolve_host();
|
||||
// test_socket_create();
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,25 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [network] example - UDP Client
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 2.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h
|
||||
*for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,25 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [network] example - UDP Server
|
||||
*
|
||||
* Welcome to raylib!
|
||||
*
|
||||
* To test examples, just press F6 and execute raylib_compile_execute script
|
||||
* Note that compiled executable is placed in the same folder as .c file
|
||||
*
|
||||
* You can find all basic examples on C:\raylib\raylib\examples folder or
|
||||
* raylib official webpage: www.raylib.com
|
||||
*
|
||||
* Enjoy using raylib. :)
|
||||
*
|
||||
* This example has been created using raylib 2.0 (www.raylib.com)
|
||||
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h
|
||||
*for details)
|
||||
*
|
||||
* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@
|
|||
<ProjectGuid>{0981CA98-E4A5-4DF1-987F-A41D09131EFC}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>core_basic_window</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>core_basic_window</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'" Label="Configuration">
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@
|
|||
<ProjectGuid>{B655E850-3322-42F7-941D-6AC18FD66CA1}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>raylib_example_cpp</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>core_basic_window_cpp</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug.DLL|Win32'" Label="Configuration">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2024
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.156
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raylib", "raylib\raylib.vcxproj", "{E89D61AC-55DE-4482-AFD4-DF7242EBC859}"
|
||||
EndProject
|
||||
|
|
@ -11,10 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{87
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_basic_window", "examples\core_basic_window.vcxproj", "{0981CA98-E4A5-4DF1-987F-A41D09131EFC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_chat_client", "examples\network_chat_client.vcxproj", "{80AE5E50-FAC7-434F-A898-2878568E7D79}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_chat_server", "examples\network_chat_server.vcxproj", "{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_ping_pong", "examples\network_ping_pong.vcxproj", "{56EB485C-00A9-459E-B758-2E86316EB7FD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network_resolve_host", "examples\network_resolve_host.vcxproj", "{A16D19CB-6AF4-4D17-8318-EABD8805247C}"
|
||||
|
|
@ -79,38 +75,6 @@ Global
|
|||
{0981CA98-E4A5-4DF1-987F-A41D09131EFC}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0981CA98-E4A5-4DF1-987F-A41D09131EFC}.Release|x86.ActiveCfg = Release|Win32
|
||||
{0981CA98-E4A5-4DF1-987F-A41D09131EFC}.Release|x86.Build.0 = Release|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x64.ActiveCfg = Debug|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x64.Build.0 = Debug|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x86.ActiveCfg = Debug|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug.DLL|x86.Build.0 = Debug|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x64.Build.0 = Debug|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Debug|x86.Build.0 = Debug|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x64.ActiveCfg = Release|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x64.Build.0 = Release|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x86.ActiveCfg = Release|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release.DLL|x86.Build.0 = Release|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x64.ActiveCfg = Release|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x64.Build.0 = Release|x64
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x86.ActiveCfg = Release|Win32
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79}.Release|x86.Build.0 = Release|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x64.ActiveCfg = Debug|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x64.Build.0 = Debug|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x86.ActiveCfg = Debug|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug.DLL|x86.Build.0 = Debug|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x64.Build.0 = Debug|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x64.ActiveCfg = Release|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x64.Build.0 = Release|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x86.ActiveCfg = Release|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release.DLL|x86.Build.0 = Release|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x64.ActiveCfg = Release|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x64.Build.0 = Release|x64
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D}.Release|x86.Build.0 = Release|Win32
|
||||
{56EB485C-00A9-459E-B758-2E86316EB7FD}.Debug.DLL|x64.ActiveCfg = Debug|x64
|
||||
{56EB485C-00A9-459E-B758-2E86316EB7FD}.Debug.DLL|x64.Build.0 = Debug|x64
|
||||
{56EB485C-00A9-459E-B758-2E86316EB7FD}.Debug.DLL|x86.ActiveCfg = Debug|Win32
|
||||
|
|
@ -242,8 +206,6 @@ Global
|
|||
GlobalSection(NestedProjects) = preSolution
|
||||
{B655E850-3322-42F7-941D-6AC18FD66CA1} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
{0981CA98-E4A5-4DF1-987F-A41D09131EFC} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
{80AE5E50-FAC7-434F-A898-2878568E7D79} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
{BC49AAF0-E8C2-4F94-A60A-C56993023C6D} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
{56EB485C-00A9-459E-B758-2E86316EB7FD} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
{A16D19CB-6AF4-4D17-8318-EABD8805247C} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
{46B18968-56BC-4FB1-A7C0-FA418E095AFD} = {8716DC0F-4FDE-4F57-8E25-5F78DFB80FE1}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<ProjectGuid>{E89D61AC-55DE-4482-AFD4-DF7242EBC859}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>raylib</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
|
@ -163,6 +163,7 @@
|
|||
<ClCompile Include="..\..\..\src\core.c" />
|
||||
<ClCompile Include="..\..\..\src\models.c" />
|
||||
<ClCompile Include="..\..\..\src\rglfw.c" />
|
||||
<ClCompile Include="..\..\..\src\rnet.c" />
|
||||
<ClCompile Include="..\..\..\src\shapes.c" />
|
||||
<ClCompile Include="..\..\..\src\text.c" />
|
||||
<ClCompile Include="..\..\..\src\textures.c" />
|
||||
|
|
@ -184,6 +185,7 @@
|
|||
<ClInclude Include="..\..\..\src\raylib.h" />
|
||||
<ClInclude Include="..\..\..\src\raymath.h" />
|
||||
<ClInclude Include="..\..\..\src\rlgl.h" />
|
||||
<ClInclude Include="..\..\..\src\rnet.h" />
|
||||
<ClInclude Include="..\..\..\src\utils.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
|
|
|||
|
|
@ -519,8 +519,8 @@ typedef struct SocketOpt
|
|||
|
||||
typedef enum
|
||||
{
|
||||
SOCKET_TCP = 1, // SOCK_STREAM
|
||||
SOCKET_UDP = 2 // SOCK_DGRAM
|
||||
SOCKET_TCP = 0, // SOCK_STREAM
|
||||
SOCKET_UDP = 1 // SOCK_DGRAM
|
||||
} SocketType;
|
||||
|
||||
typedef struct UDPChannel
|
||||
|
|
|
|||
54
src/rnet.c
54
src/rnet.c
|
|
@ -62,18 +62,22 @@ typedef struct _SocketAddress
|
|||
{
|
||||
struct sockaddr address;
|
||||
} _SocketAddress;
|
||||
|
||||
typedef struct _SocketAddressIPv4
|
||||
{
|
||||
struct sockaddr_in address;
|
||||
} _SocketAddressIPv4;
|
||||
|
||||
typedef struct _SocketAddressIPv6
|
||||
{
|
||||
struct sockaddr_in6 address;
|
||||
} _SocketAddressIPv6;
|
||||
|
||||
typedef struct _SocketAddressStorage
|
||||
{
|
||||
struct sockaddr_storage address;
|
||||
} _SocketAddressStorage;
|
||||
|
||||
typedef struct _AddressInformation
|
||||
{
|
||||
struct addrinfo addr;
|
||||
|
|
@ -310,7 +314,9 @@ static bool InitSocket(Socket *sock, struct addrinfo *addr)
|
|||
sock->channel = socket(AF_INET6, SOCK_DGRAM, 0);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
default:
|
||||
TraceLog(LOG_WARNING, "Invalid socket type specified.");
|
||||
break;
|
||||
}
|
||||
return IsSocketValid(sock);
|
||||
}
|
||||
|
|
@ -1005,6 +1011,10 @@ bool SocketListen(SocketConfig *config, SocketResult *result)
|
|||
else
|
||||
{
|
||||
success = false;
|
||||
result->socket->status = SocketGetLastError();
|
||||
TraceLog(LOG_WARNING, "Socket Error: %s",
|
||||
SocketErrorCodeToString(result->socket->status));
|
||||
SocketSetLastError(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1813,48 +1823,6 @@ int CheckSockets(SocketSet *set, unsigned int timeout)
|
|||
return (retval);
|
||||
}
|
||||
|
||||
// Allocate a Packet
|
||||
// Packet *AllocPacket(int size)
|
||||
// {
|
||||
// struct Packet *packet;
|
||||
// packet = (struct Packet *) malloc(sizeof(*packet));
|
||||
// if (packet != NULL)
|
||||
// {
|
||||
// memset(packet, 0, sizeof(*packet));
|
||||
// packet->size = 0;
|
||||
// packet->offs = 0;
|
||||
// packet->maxs = size;
|
||||
// packet->data = (uint8_t *) malloc(size * sizeof(uint8_t));
|
||||
// memset(packet->data, '\0', size);
|
||||
// if (packet->data == NULL)
|
||||
// {
|
||||
// free(packet);
|
||||
// packet = NULL;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// free(packet);
|
||||
// packet = NULL;
|
||||
// }
|
||||
// return packet;
|
||||
// }
|
||||
|
||||
// Free an allocated Packet
|
||||
// void FreePacket(Packet *packet)
|
||||
// {
|
||||
// if (packet != NULL)
|
||||
// {
|
||||
// if (packet->data != NULL)
|
||||
// {
|
||||
// free(packet->data);
|
||||
// packet->data = NULL;
|
||||
// }
|
||||
// free(packet);
|
||||
// packet = NULL;
|
||||
// }
|
||||
// }
|
||||
|
||||
// Allocate an AddressInformation
|
||||
AddressInformation AllocAddress()
|
||||
{
|
||||
|
|
|
|||
22
src/rnet.h
22
src/rnet.h
|
|
@ -77,17 +77,17 @@
|
|||
#define NOMSG // typedef MSG and associated routines
|
||||
#define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_*
|
||||
#define NOSCROLL // SB_* and scrolling routines
|
||||
#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc.
|
||||
#define NOSOUND // Sound driver routines
|
||||
#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines
|
||||
#define NOWH // SetWindowsHook and WH_*
|
||||
#define NOWINOFFSETS // GWL_*, GCL_*, associated routines
|
||||
#define NOCOMM // COMM driver routines
|
||||
#define NOKANJI // Kanji support stuff.
|
||||
#define NOHELP // Help engine interface.
|
||||
#define NOPROFILER // Profiler interface.
|
||||
#define NODEFERWINDOWPOS // DeferWindowPos routines
|
||||
#define NOMCX // Modem Configuration Extensions
|
||||
#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc.
|
||||
#define NOSOUND // Sound driver routines
|
||||
#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines
|
||||
#define NOWH // SetWindowsHook and WH_*
|
||||
#define NOWINOFFSETS // GWL_*, GCL_*, associated routines
|
||||
#define NOCOMM // COMM driver routines
|
||||
#define NOKANJI // Kanji support stuff.
|
||||
#define NOHELP // Help engine interface.
|
||||
#define NOPROFILER // Profiler interface.
|
||||
#define NODEFERWINDOWPOS // DeferWindowPos routines
|
||||
#define NOMCX // Modem Configuration Extensions
|
||||
#define MMNOSOUND
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user