Skip to content

Commit 43a1b9b

Browse files
committed
v2.2.0
1 parent 1c2b8b5 commit 43a1b9b

48 files changed

Lines changed: 150 additions & 542 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
All notable changes to FishNet will be documented in this file.
44

5+
## \[v2.2.0\] - 2026.06.07
6+
7+
### Added:
8+
- Modular includes architecture: headers are now included individually (e.g., `<fishnet/FishServer.h>`, `<fishnet/bedrock/BedrockServer.h>`).
9+
- Separated Bedrock extension headers into an isolated `include-bedrock` directory that is only exposed when the `bedrock` configuration is enabled.
10+
11+
### Removed:
12+
- Removed the monolithic `fishnet.h` and `fishnet-bedrock.h` umbrella headers.
13+
- Removed the deprecated `--examples` build parameter.
14+
15+
### Fixed:
16+
- Fixed multiple packet header files containing duplicate `#pragma once` directives.
17+
18+
### Updated:
19+
- Updated `getting-started.md`, `api-reference.md`, and `architecture.md` to reflect the new modular include paths and directory structure.
20+
521
## \[v2.1.0\] - 2025.04.12
622

723
### Fixed:
@@ -12,8 +28,8 @@ All notable changes to FishNet will be documented in this file.
1228
- GamePacket types
1329

1430
### Updated:
15-
- docs
16-
- github actions
31+
docs
32+
github actions
1733

1834
## \[v2.0.0\] - 2025.04.04
1935

@@ -35,5 +51,5 @@ All notable changes to FishNet will be documented in this file.
3551
- Compression API (Zlib/Snappy/None) via user-supplied functions
3652
- Cross-platform: Windows (x64/arm64), macOS (x64/arm64), Linux (x64/arm64)
3753
- Shared library build (fishnet.dll / [libfishnet.so](http://libfishnet.so) / libfishnet.dylib)
38-
- xmake build system with --bedrock and --examples options
39-
- Packet logging in debug builds (FISHNET\_DEBUG)
54+
- xmake build system with --bedrock option
55+
- Packet logging in debug builds (FISHNET\_DEBUG)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ xmake build
2828
### Server
2929

3030
```cpp
31-
#include <fishnet.h>
31+
#include <fishnet/FishServer.h>
3232
#include <iostream>
3333
#include <thread>
3434
#include <atomic>

docs/api-reference.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ Complete documentation of every public class, method, type, and constant in Fish
3131

3232
## Headers
3333

34-
| Header | Description |
35-
|--------|-------------|
36-
| `<fishnet.h>` | Everything in core FishNet (no Bedrock) |
37-
| `<fishnet-bedrock.h>` | Core + all Bedrock extensions |
34+
FishNet uses modular headers. You only need to include the specific components you use.
35+
36+
| Example Component | Header Path |
37+
|-------------------|-------------|
38+
| `FishServer` | `<fishnet/FishServer.h>` |
39+
| `FishClient` | `<fishnet/FishClient.h>` |
40+
| `Connection` | `<fishnet/Connection.h>` |
41+
| `BedrockServer` | `<fishnet/bedrock/BedrockServer.h>` |
42+
| `BedrockClient` | `<fishnet/bedrock/BedrockClient.h>` |
3843

3944
---
4045

docs/architecture.md

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,6 @@
55
```
66
fishnet/
77
├── src/ Core FishNet (always compiled)
8-
│ ├── include/
9-
│ │ ├── fishnet.h Umbrella header
10-
│ │ └── fishnet/
11-
│ │ ├── platform.h Cross-platform sockets
12-
│ │ ├── FishPeer.h Core engine (250 lines)
13-
│ │ ├── FishServer.h Server wrapper
14-
│ │ ├── FishClient.h Client wrapper
15-
│ │ ├── Connection.h Per-peer state
16-
│ │ ├── PacketHandler.h Callback types
17-
│ │ ├── protocol/
18-
│ │ │ ├── Constants.h Magic, reliability, packet IDs
19-
│ │ │ └── EncapsulatedPacket.h Frame structure
20-
│ │ ├── packets/ One file per packet type
21-
│ │ │ ├── UnconnectedPing.h
22-
│ │ │ ├── UnconnectedPong.h
23-
│ │ │ ├── OpenConnectionRequest1.h
24-
│ │ │ ├── OpenConnectionReply1.h
25-
│ │ │ ├── OpenConnectionRequest2.h
26-
│ │ │ ├── OpenConnectionReply2.h
27-
│ │ │ ├── ConnectionRequest.h
28-
│ │ │ ├── ConnectionRequestAccepted.h
29-
│ │ │ ├── NewIncomingConnection.h
30-
│ │ │ ├── ConnectedPing.h
31-
│ │ │ ├── DisconnectionNotification.h
32-
│ │ │ └── AckNak.h
33-
│ │ └── utils/
34-
│ │ ├── BinaryBuffer.h Binary read/write
35-
│ │ ├── Address.h sockaddr_in wrapper
36-
│ │ └── AddressSerialization.h RakNet wire format
378
│ ├── core/
389
│ │ ├── FishPeer.cpp Lifecycle, dispatch
3910
│ │ ├── FishPeerSend.cpp Sending, split
@@ -43,23 +14,38 @@ fishnet/
4314
│ ├── server/FishServer.cpp
4415
│ └── client/FishClient.cpp
4516
46-
├── src-bedrock/ Bedrock extension (--bedrock=y)
47-
│ ├── include/
48-
│ │ ├── fishnet-bedrock.h Umbrella header
49-
│ │ └── fishnet-bedrock/
50-
│ │ ├── BedrockMotd.h MOTD string builder
51-
│ │ ├── BedrockServer.h Server + GamePacket handling
52-
│ │ ├── BedrockClient.h Client + GamePacket handling
53-
│ │ └── GamePacket.h 0xFE wrap/unwrap, batch, compression
17+
├── include/ Standard headers (always compiled)
18+
│ └── fishnet/
19+
│ ├── platform.h Cross-platform sockets
20+
│ ├── FishPeer.h Core engine (250 lines)
21+
│ ├── FishServer.h Server wrapper
22+
│ ├── FishClient.h Client wrapper
23+
│ ├── Connection.h Per-peer state
24+
│ ├── PacketHandler.h Callback types
25+
│ ├── protocol/
26+
│ │ ├── Constants.h Magic, reliability, packet IDs
27+
│ │ └── EncapsulatedPacket.h Frame structure
28+
│ ├── packets/ One file per packet type
29+
│ │ ├── UnconnectedPing.h
30+
│ │ ├── UnconnectedPong.h
31+
│ │ └── ...
32+
│ └── utils/
33+
│ ├── BinaryBuffer.h Binary read/write
34+
│ ├── Address.h sockaddr_in wrapper
35+
│ └── AddressSerialization.h RakNet wire format
36+
37+
├── src-bedrock/ Bedrock extension source (--bedrock=y)
5438
│ └── core/
5539
│ ├── BedrockServer.cpp
5640
│ └── BedrockClient.cpp
5741
58-
├── examples/
59-
│ ├── server.cpp Generic FishNet server
60-
│ ├── client.cpp Generic FishNet client
61-
│ ├── bedrock_server.cpp Bedrock server with GamePacket
62-
│ └── bedrock_client.cpp Bedrock bot with GamePacket
42+
├── include-bedrock/ Bedrock extension headers (--bedrock=y)
43+
│ └── fishnet/
44+
│ └── bedrock/
45+
│ ├── BedrockMotd.h MOTD string builder
46+
│ ├── BedrockServer.h Server + GamePacket handling
47+
│ ├── BedrockClient.h Client + GamePacket handling
48+
│ └── GamePacket.h 0xFE wrap/unwrap, batch, compression
6349
6450
├── docs/ Documentation
6551
├── .github/workflows/ CI/CD
@@ -100,7 +86,6 @@ fishnet/
10086
| `-m debug` || Debug build with packet logging |
10187
| `-m release` || Optimized build, no logging |
10288
| `--bedrock=y` | `n` | Include Bedrock extension |
103-
| `--examples=y` | `n` | Build example programs |
10489

10590
## Platforms
10691

docs/getting-started.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ xmake run myapp
3232

3333
### Server
3434
```cpp
35-
#include <fishnet.h>
35+
#include <fishnet/FishServer.h>
3636
#include <iostream>
3737
#include <thread>
3838
#include <csignal>
@@ -70,7 +70,7 @@ int main() {
7070

7171
### Client
7272
```cpp
73-
#include <fishnet.h>
73+
#include <fishnet/FishClient.h>
7474
#include <iostream>
7575
#include <thread>
7676

@@ -93,7 +93,7 @@ int main() {
9393

9494
### Bedrock Server
9595
```cpp
96-
#include <fishnet-bedrock.h>
96+
#include <fishnet/bedrock/BedrockServer.h>
9797
#include <iostream>
9898
#include <thread>
9999
#include <csignal>
@@ -151,11 +151,7 @@ xmake build
151151
xmake f -m release --bedrock=y
152152
xmake build
153153

154-
# With examples
155-
xmake f -m release --bedrock=y --examples=y
156-
xmake build
157-
158154
# Debug (with packet logging)
159-
xmake f -m debug --bedrock=y --examples=y
155+
xmake f -m debug --bedrock=y
160156
xmake build
161157
```

examples/bedrock_client.cpp

Lines changed: 0 additions & 68 deletions
This file was deleted.

examples/bedrock_server.cpp

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)