Commit Graph

53 Commits

Author SHA1 Message Date
purerosefallen d9d0cb8c09 remove CTOS_HS_READY 2025-06-21 11:16:01 +08:00
salix5 456f27564e fix STOC_CHAT, CTOS_CHAT handling (#2836) 2025-06-14 16:39:00 +08:00
salix5 8682f411e0 Revert "use std array in NetServer::ServerEchoRead (#2648)" (#2653)
This reverts commit d7cf1187df.
2025-01-24 09:13:30 +08:00
salix5 d7cf1187df use std array in NetServer::ServerEchoRead (#2648) 2025-01-13 19:52:00 +08:00
salix5 1127be0fba add CTOS_DeckData (#2641)
* add CTOS_DeckData

* Update netserver.cpp

* update length check

* update length check
2025-01-11 18:09:47 +08:00
salix5 56247c6d71 tweak ServerEchoRead, ClientRead (#2636)
* tweak ServerEchoRead, ClientRead

* fix warning
2024-12-17 23:13:12 +08:00
salix5 fb4580f93d Patch1 (#2635)
* update include in network.h

* format
2024-12-15 15:15:24 +08:00
salix5 ced6406564 use uint16_t in NetServer, DuelClient (#2633) 2024-12-13 20:29:53 +08:00
salix5 a01ce2f26a set info to default value before creating duel_mode 2024-12-12 22:33:44 +08:00
salix5 7721bfe017 remove NULL (#2626) 2024-12-04 23:19:51 +08:00
salix5 51929625b3 BufferIO: add CopyCharArray (#2616)
array length is determined by reference to array
2024-11-16 11:51:18 +08:00
salix5 ec69bb11eb update buffer size (#2586) 2024-08-31 17:36:30 +08:00
salix5 2dd2263c44 use <cstring> functions (#2580) 2024-08-18 03:14:02 +08:00
salix5 080d7781f0 clean config.h (#2568)
* move header files to game.h

* include mutex when necessary

* include myfilesystem.h when necessary

* include thread when necessary

* include string

* include GL when necessary

* remove #pragma once

* rename guard macro to YGOPRO_CONFIG_H

* fix warning C4456, C4458

* move GL to game.h

* use <cstring> functions

* include <wchar.h>
2024-08-11 05:05:20 +08:00
salix5 bb82764e0b Use local variable in ServerEchoRead, ClientRead (#2562)
* use local var in ServerEchoRead, ClientRead

* zero init in GetResponse
2024-06-18 16:54:48 +08:00
salix5 cc91dc81ee verify the source of BufferIO::CopyWStr (#2558)
* verify the source of BufferIO::CopyWStr

* add BufferIO::NullTerminate

* use MAX_STRING_ID

* use constant

* use constant
2024-06-09 11:00:08 +08:00
salix5 e209e77502 disconnect when the packet is too large (#2551)
* use memcpy in DuelClient, NetServer

* NetServer: discard too large packet

* DuelClient: discard too large packet

* replace memcpy with std::memcpy

* disconnect when the packet is too large

* check packet_len

* check len in HandleCTOSPacket()

* check len in HandleSTOCPacketLan()

* remove bool type in HostInfo

* check len in packet handling

* add boundary check to STOC_CHAT packet

* use memcpy in DuelMode::JoinGame

* add DECK_MAX_SIZE, DECK_MIN_SIZE

* fix DuelMode::UpdateDeck()

* fix

* fix Manager::OpenDeckFile()

* update DuelMode init

* update DuelMode::JoinGame

* update DuelMode::GetResponse

* Revert "check len in packet handling"

This reverts commit 2b5c12f360.

* use memcpy in GetPosition

* check struct size by static_assert

* update DuelMode::UpdateDeck

* check if the struct is trivially copyable

* replace unsigned short to uint16_t

* replace unsigned int to uint32_t

* add padding member to STOC_HS_PlayerEnter

* workaround: use STOC_HS_PlayerEnter_size
2024-05-31 21:52:06 +08:00
salix5 4315ef4657 remove type BOOL 2024-03-21 17:26:45 +08:00
salix5 2491768e8d add boundary check to network buffer (#2517)
* fix warning

* add boundary check to network buffer

* update submodule
2024-03-12 02:52:18 +08:00
salix5 e3155746c5 fix: check response size before writing (#2514)
* update DuelClient::response_buf[]

* fix: check response size before writing
2024-02-14 04:03:07 +08:00
salix5 32389dda77 use unsigned char buffer 2023-12-14 16:10:19 +08:00
Edoardo Lolletti 7171206656 Support multple lan clients from the same IP (#2452)
* Support multiple lam rooms from the same ip on different ports

* Make broadcast socket use SO_REUSEADDR

This allows multiple instances of the client to listen from broadcast messages at the same time on the same port

* Update duelclient.cpp
2022-09-14 08:45:36 +08:00
Mercury233 c0bb37190a update Simplified Chinese ot rule (#2368) 2021-09-02 15:56:33 +08:00
DailyShana de2ec1baaa use standard thread library (#2221)
* use standard thread library
* use standard sleep function
2019-07-14 10:08:33 +08:00
DailyShana 481f3c8726 Revert "Clean up broadcasting code (#2218)"
This reverts commit 8d5861613e.
2019-07-06 14:29:36 +08:00
Edoardo Lolletti 8d5861613e Clean up broadcasting code (#2218) 2019-06-29 19:00:31 +08:00
DailyShana 0a8a47264d verify deck data (#2216) 2019-06-16 21:36:38 -07:00
argon b48e4f5f08 fix 2013-04-12 18:10:31 +08:00
Soar Qin acf894d295 fixed linux compilation 2012-06-08 00:59:07 +08:00
argon.sun 2b1b5e62c8 fix 2012-05-09 21:30:12 +08:00
argon.sun 414bc29926 vs build 2012-04-17 20:02:49 +08:00
argon.sun 01d3da4755 fix 2012-03-29 01:32:44 +08:00
argon.sun 636695b717 chat 2012-03-28 21:40:10 +08:00
argon.sun 155a92fb73 time limit 2012-02-23 21:20:41 +08:00
argon.sun 6dcb7a3f3b fix 2012-02-22 21:29:02 +08:00
argon.sun 028fbb4677 ver update 2012-02-10 19:59:18 +08:00
argon.sun 8a3718e128 fix 2012-02-03 20:36:19 +08:00
argon.sun f02cefe0e0 match 2012-01-30 20:51:25 +08:00
argon.sun fa14238e97 host finding done. 2012-01-30 01:08:34 +08:00
argon.sun 2007e1b607 host finding 2012-01-29 20:21:58 +08:00
argon.sun 1bcbcdfef0 fix 2012-01-21 09:18:16 +08:00
argon.sun 42c400f5d1 recon 2012-01-20 19:23:32 +08:00
argon.sun 8d2f4a3382 recon 2012-01-16 20:46:49 +08:00
argon.sun 8c3425c43f recon 2012-01-16 01:31:46 +08:00
argon.sun 1b5e954f99 new script & recon 2012-01-15 18:50:12 +08:00
argon.sun b48ae1683b new scripts 2012-01-14 16:48:15 +08:00
argon.sun 2b06d328fa network 2012-01-12 20:31:14 +08:00
argon.sun 42ea0f6916 network 2012-01-11 21:04:08 +08:00
argon.sun f3d8287f3b recon 2012-01-11 08:52:28 +08:00
argon.sun bcfd1afc60 recon 2012-01-10 21:08:42 +08:00