mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add string socket:send overload
This commit is contained in:
parent
5c40cf3149
commit
36edad039c
3 changed files with 5 additions and 2 deletions
|
|
@ -87,6 +87,9 @@ static int l_send(lua::State* L) {
|
|||
connection->send(
|
||||
reinterpret_cast<char*>(bytes->data().data()), bytes->data().size()
|
||||
);
|
||||
} else if (lua::isstring(L, 2)) {
|
||||
auto string = lua::tolstring(L, 2);
|
||||
connection->send(string.data(), string.length());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue