• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Razakhel / RaZ / 18232050474

03 Oct 2025 07:37PM UTC coverage: 73.724% (-0.4%) from 74.093%
18232050474

push

github

Razakhel
[Script/LuaNetwork] Added Lua bindings for networking objects

13 of 14 new or added lines in 2 files covered. (92.86%)

8347 of 11322 relevant lines covered (73.72%)

1746.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.31
/src/RaZ/Script/LuaNetwork.cpp
1
#include "RaZ/Network/TcpClient.hpp"
2
#include "RaZ/Network/TcpServer.hpp"
3
#include "RaZ/Script/LuaWrapper.hpp"
4

5
#define SOL_ALL_SAFETIES_ON 1
6
#include "sol/sol.hpp"
7

8
namespace Raz {
9

10
void LuaWrapper::registerNetworkTypes() {
2✔
11
  sol::state& state = getState();
2✔
12

13
  {
14
    sol::usertype<TcpClient> tcpClient = state.new_usertype<TcpClient>("TcpClient",
NEW
15
                                                                       sol::constructors<TcpClient(),
×
16
                                                                                         TcpClient(const std::string&, unsigned short)>());
2✔
17
    tcpClient["connect"] = &TcpClient::connect;
2✔
18
    tcpClient["send"]    = &TcpClient::send;
2✔
19
    tcpClient["close"]   = &TcpClient::close;
2✔
20
  }
2✔
21

22
  {
23
    sol::usertype<TcpServer> tcpServer = state.new_usertype<TcpServer>("TcpServer",
24
                                                                       sol::constructors<TcpServer(unsigned short)>());
2✔
25
    tcpServer["start"] = &TcpServer::start;
2✔
26
    tcpServer["stop"]  = &TcpServer::stop;
2✔
27
  }
2✔
28
}
2✔
29

30
} // namespace Raz
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc