QoL improvements

This commit is contained in:
Alex
2023-03-27 20:11:32 +03:00
parent 3eb6923374
commit 93afcd2210
59 changed files with 612 additions and 424 deletions

View File

@ -60,7 +60,7 @@ namespace NetworkUDP
void UDP::Send(Socket *Socket, uint8_t *Data, uint64_t Length)
{
netdbg("Sending %d bytes to %s", Length, Socket->RemoteIP.v4.ToStringLittleEndian(), Socket->RemotePort);
uint16_t TotalLength = Length + sizeof(UDPHeader);
uint16_t TotalLength = s_cst(uint16_t, Length + sizeof(UDPHeader));
UDPPacket *packet = (UDPPacket *)kmalloc(TotalLength);
packet->Header.SourcePort = Socket->LocalPort;
packet->Header.DestinationPort = Socket->RemotePort;