Skip to content

Commit

Permalink
fix build error #162
Browse files Browse the repository at this point in the history
  • Loading branch information
sniper00 committed Sep 30, 2023
1 parent 8642019 commit 7c0b257
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build/projects/moon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ all: prebuild prelink $(TARGET)
endif

OBJECTS := \
$(OBJDIR)/socket.o \
$(OBJDIR)/socket_server.o \
$(OBJDIR)/server.o \
$(OBJDIR)/worker.o \
$(OBJDIR)/moon.o \
Expand Down Expand Up @@ -132,7 +132,7 @@ else
$(OBJECTS): | $(OBJDIR)
endif

$(OBJDIR)/socket.o: ../../../moon-src/core/network/socket.cpp
$(OBJDIR)/socket_server.o: ../../../moon-src/core/network/socket_server.cpp
@echo $(notdir $<)
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
$(OBJDIR)/server.o: ../../../moon-src/core/server.cpp
Expand Down
4 changes: 2 additions & 2 deletions build/projects/moon/moon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<ClInclude Include="..\..\..\moon-src\core\network\const_buffers_holder.hpp" />
<ClInclude Include="..\..\..\moon-src\core\network\error.hpp" />
<ClInclude Include="..\..\..\moon-src\core\network\moon_connection.hpp" />
<ClInclude Include="..\..\..\moon-src\core\network\socket.h" />
<ClInclude Include="..\..\..\moon-src\core\network\socket_server.h" />
<ClInclude Include="..\..\..\moon-src\core\network\stream_connection.hpp" />
<ClInclude Include="..\..\..\moon-src\core\network\streambuf.hpp" />
<ClInclude Include="..\..\..\moon-src\core\network\ws_connection.hpp" />
Expand All @@ -124,7 +124,7 @@
<ClInclude Include="..\..\..\moon-src\services\lua_service.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\moon-src\core\network\socket.cpp" />
<ClCompile Include="..\..\..\moon-src\core\network\socket_server.cpp" />
<ClCompile Include="..\..\..\moon-src\core\server.cpp" />
<ClCompile Include="..\..\..\moon-src\core\worker.cpp" />
<ClCompile Include="..\..\..\moon-src\moon.cpp" />
Expand Down
4 changes: 2 additions & 2 deletions build/projects/moon/moon.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ClInclude Include="..\..\..\moon-src\core\network\moon_connection.hpp">
<Filter>core\network</Filter>
</ClInclude>
<ClInclude Include="..\..\..\moon-src\core\network\socket.h">
<ClInclude Include="..\..\..\moon-src\core\network\socket_server.h">
<Filter>core\network</Filter>
</ClInclude>
<ClInclude Include="..\..\..\moon-src\core\network\stream_connection.hpp">
Expand All @@ -59,7 +59,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\moon-src\core\network\socket.cpp">
<ClCompile Include="..\..\..\moon-src\core\network\socket_server.cpp">
<Filter>core\network</Filter>
</ClCompile>
<ClCompile Include="..\..\..\moon-src\core\server.cpp">
Expand Down
2 changes: 1 addition & 1 deletion lualib-src/lua_moon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ static int lasio_udp(lua_State* L)
address = std::string_view{ addr, size };
port = (asio::ip::port_type)luaL_checkinteger(L, 2);
}
uint32_t fd = sock.udp(S->id(), address, port);
uint32_t fd = sock.udp_open(S->id(), address, port);
lua_pushinteger(L, fd);
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ std::pair<uint32_t, tcp::endpoint> socket_server::listen(const std::string & hos
}
}

uint32_t socket_server::udp(uint32_t owner, std::string_view host, uint16_t port)
uint32_t socket_server::udp_open(uint32_t owner, std::string_view host, uint16_t port)
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace moon

std::pair<uint32_t, tcp::endpoint> listen(const std::string& host, uint16_t port, uint32_t owner, uint8_t type);

uint32_t udp(uint32_t owner, std::string_view host, uint16_t port);
uint32_t udp_open(uint32_t owner, std::string_view host, uint16_t port);

bool udp_connect(uint32_t fd, std::string_view host, uint16_t port);

Expand Down
2 changes: 1 addition & 1 deletion moon-src/core/worker.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "config.hpp"
#include "common/concurrent_queue.hpp"
#include "network/socket.h"
#include "network/socket_server.h"

namespace moon
{
Expand Down

0 comments on commit 7c0b257

Please sign in to comment.