Commit graph

184 commits

Author SHA1 Message Date
ChillerDragon 794915942c Close connection on ctrl+c 2022-11-04 13:07:34 +01:00
ChillerDragon effa00b001 Disconnect before connecting 2022-11-04 13:04:51 +01:00
ChillerDragon 0e42839e74 Fix reconnecting 2022-11-04 12:55:01 +01:00
ChillerDragon 57a8f0bcc7 Unhardcode the last packet (startinfo)
Also support bigger integers than 63 :)
2022-11-04 12:31:42 +01:00
ChillerDragon 2c8e6aeb8f Unhardcode startinfo
Thanks a lot to @Learath2 for explaining the int packer to me <3
2022-11-04 11:39:41 +01:00
ChillerDragon 2919feb529 Unhardcode more chunk headers 2022-11-04 10:12:23 +01:00
ChillerDragon 68e8cb6dd0 Alert on empty payload instead of crashing 2022-11-04 09:27:36 +01:00
ChillerDragon 24fa105f66 Do not spawn a thread by default
This allows users to implement better multi threading than me.
Or if someone just wants to fire and forget a client that should just
use the provided hooks then not detaching takes away the effort
of keeping the program running.

Imo it is an easier and more fun problem to have:

  "My client connects fine but my other ruby code does not run"

than

  "My program just quits when I run it"
2022-11-01 15:32:47 +01:00
ChillerDragon f7486c353f Spawn thread for connection 2022-11-01 15:27:39 +01:00
ChillerDragon 618ac5f5e3 Was not sure if lib or full client
I guess we go for library now
2022-11-01 14:26:40 +01:00
ChillerDragon 9fc83cb327 Allow hooking in custom chat code 2022-11-01 14:25:56 +01:00
ChillerDragon 517107a4ad Wannabe lib dev not knowing how to use procs 2022-11-01 14:11:11 +01:00
ChillerDragon 390840e6f0 Fixing drunk coders mess 2022-11-01 13:56:19 +01:00
ChillerDragon 01915a5629 Remove hacks and break everything in the process 2022-11-01 10:52:48 +01:00
ChillerDragon cd0d5da9fa Working send_chat() poggers 2022-11-01 10:37:24 +01:00
ChillerDragon 07ac2e07b8 Joining public servers works pretty good 2022-10-31 08:54:13 +01:00
ChillerDragon 9ae89fa173 Chat readable by default and debug opt in 2022-10-31 08:45:43 +01:00
ChillerDragon c9495dd293 Display chat messages 2022-10-31 08:35:13 +01:00
ChillerDragon 5e02155230 Not acking resent packets did the trick 2022-10-31 08:22:21 +01:00
ChillerDragon 9903508d0b Ah no nvm it seems to work
I managed to stay on a default config vanilla server
until inactive kick
2022-10-30 20:07:08 +01:00
ChillerDragon e3bda9a3e6 Still timeouts but looks good in wireshark 2022-10-30 19:58:51 +01:00
ChillerDragon 97a44b183f Still wrong ack but getting a tee in the world again 2022-10-30 19:44:49 +01:00
ChillerDragon 292bbf5fe0 Fixes in the header not sure if it works tho 2022-10-30 19:19:10 +01:00
ChillerDragon b7a2cfb5c3 Start working on proper packet header 2022-10-30 19:00:13 +01:00
ChillerDragon f75eaebcee Print info packet when sending it 2022-10-30 11:18:15 +01:00
ChillerDragon 1ef6abf377 A bit of cleanup 2022-10-30 10:13:18 +01:00
ChillerDragon 8352033d0b TODO: ack in packet header 2022-10-29 17:04:35 +02:00
ChillerDragon 4544bb3e1a Reach old connection state with less hacks 2022-10-29 16:18:07 +02:00
ChillerDragon d68be4eb68 More todos than progress 2022-10-29 13:17:42 +02:00
ChillerDragon f0762eee9d I do not understand the connless flags
But the control flag seems to be working
So parse packets with the control flag in the header as
control message

and all other messages as connection messsages
aka CClient::ProcessServerPacket()
2022-10-29 12:16:44 +02:00
ChillerDragon f48968a349 Refactor to check flags and use packet class
Break everything in the process
2022-10-29 12:09:10 +02:00
ChillerDragon 694cb4b448 Decompress packet payload 2022-10-25 20:17:07 +02:00
ChillerDragon 6bac18830d Start working on the client code 2022-10-25 19:42:20 +02:00
Chiller Dragon 81b8366792
Initial commit 2022-10-25 14:07:56 +02:00