deathcap
cf5f8c1c4c
Pass options to all src/client/*, for consistency
2016-01-26 00:01:09 -08:00
deathcap
fe327c85e1
Move net.socket() and dns.resolveSrv() into client/net_tcp
...
This has been the trickest to refactor/remodularize, since it used to
modify the Client prototype to augument connect(host, port). This added
a dependence on TCP/IP host/port socketpairs, refactor to add a
'connect' option instead, called with the client instance. Update ping
accordingly, but it has to call connect itself since it does not include
client/caseCorrect, which normally calls connect. Still may be able to
improve further and untangle these interdependencies cleanlier.
2016-01-25 23:57:10 -08:00
deathcap
de36de8496
Break client/caseCorrect dependence on TCP/IP host/port; generalize options.connect(client)
2016-01-25 23:47:23 -08:00
deathcap
9c2112802a
Fix ursa imports
2016-01-25 23:40:35 -08:00
deathcap
34534b2aa6
Move onLogin set state=PLAY to client/play
2016-01-25 23:36:36 -08:00
deathcap
b37dcc4d08
Move onConnect/set_protocol to client/setProtocol
2016-01-25 23:33:58 -08:00
deathcap
821227d73e
Move making a request to get case-correct username before connecting to client/caseCorrect
2016-01-25 23:28:14 -08:00
deathcap
8c4406b4a2
Move keepAlive/checkTimeoutInterval to client/keepalive
2016-01-25 23:24:20 -08:00
deathcap
20e076ebcf
Move onCompressionRequest to client/compress
2016-01-25 23:22:35 -08:00
deathcap
a727829a98
Move onKeepAlive to client/keepalive
2016-01-25 23:19:57 -08:00
deathcap
cbaaeb8eb2
Move onEncryptionKeyRequest to client/encryption
2016-01-25 23:18:32 -08:00
deathcap
bd72488bf3
Move FML|HS listener to forge_client example, reduce changes in createClient
2016-01-24 11:19:19 -08:00
deathcap
93c5c7315a
Add tagHost option, clients can use to append to set_protocol serverHost
...
This is used by Forge clients to tell the server they support FML|HS,
otherwise the server will kick with "you must have FML/Forge installed".
2016-01-24 11:11:47 -08:00
deathcap
92b6c3778b
Add documentation for forge/forgeMods options and forgeMods event
2016-01-23 21:00:00 -08:00
deathcap
c0271874d2
Emit forgeMods event when receiving server's ModList
2016-01-23 20:56:00 -08:00
deathcap
2802ac9d2b
fml console.log -> debug
2016-01-23 20:54:43 -08:00
deathcap
f6ad1d8061
Move FML|HS to fml.js
2016-01-23 20:47:29 -08:00
deathcap
283b75d694
Forge client example pings server to get forgeMods list
...
Avoids the need to hardcode the mod list in the client, in order to
successfully connect to arbitrary Forge servers (with various mods).
2016-01-23 20:01:07 -08:00
deathcap
0b45b439bc
Use symbolic values for writeAck() phase
2016-01-23 19:29:27 -08:00
deathcap
6c33ec2856
Refactor FML|HS to use state machine
...
Instead of responding based on the packet type received, maintain a
local state and ensure the correct packets are received. Should help
avoid unexpected states/behavior. See:
https://github.com/ORelio/Minecraft-Console-Client/pull/100/files#diff-65b97c02a9736311374109e22d30ca9cR297
2016-01-23 19:26:50 -08:00
deathcap
8fd30f6af9
Move to fmlHandshakeStep()
2016-01-23 19:03:54 -08:00
deathcap
0b2550e206
Add forgeMods option, set to array of Forge modifications installed on client
2016-01-23 18:17:18 -08:00
deathcap
1349fdfc73
Update examples to log when connection is lost
...
Normally, the client will send a kick packet if the client is
disconnected from the server, but if the connection is lost due to
network or lower-level protocol issues, the 'end' event will be emitted.
Log this event in the examples so it is clear why the scripts exit.
2016-01-23 18:08:18 -08:00
deathcap
46a134c5e9
Fix sending Handshake|Ack phase
2016-01-23 17:44:20 -08:00
deathcap
c680c0d12a
Fix RegistryData hasMore field definition and usage
2016-01-23 17:05:33 -08:00
deathcap
265fcd9d4c
ModList field uses 'modid' to match ServerPingList packet JSON
2016-01-23 17:04:02 -08:00
deathcap
6a6bdff5c8
fmlProtocolVersion client/server no longer collide
2016-01-23 17:03:13 -08:00
deathcap
b9bc0e1cb8
Switch on packet type through an anonymous container
2016-01-23 17:02:07 -08:00
deathcap
74c5b74950
Use a mapper for symbolic subpacket names vs discriminator byte values
2016-01-23 16:29:15 -08:00
deathcap
80cc68e480
Add a mapper for FML|HS discrminator bytes
2016-01-23 16:16:31 -08:00
deathcap
30b347cb99
FML|HS client sends HandshakeAck COMPLETE in response to server
2016-01-23 15:42:03 -08:00
deathcap
e80471753b
Complete the HandshakeAck exchange
2016-01-23 15:41:07 -08:00
deathcap
06f8a5fe28
Send client HandshakeAck with WAITINGSERVERDATA
2016-01-23 15:31:33 -08:00
deathcap
790ba538d9
Show FML|HS ModList from server
2016-01-23 15:19:28 -08:00
deathcap
735b7f6d65
Hardcode a mod list for now
2016-01-23 15:14:02 -08:00
deathcap
1f68b30d87
Add missing string type in FML|HS serializer
...
Fixes Error: SizeOf error for mods.2.0.name : missing data type: string
2016-01-23 15:12:40 -08:00
deathcap
459da049c1
FML|HS ModList packet array
2016-01-23 14:45:52 -08:00
deathcap
cb9e6db991
FML|HS: ModList: send empty client modlist
2016-01-23 14:31:03 -08:00
deathcap
2787adbad3
Register client plugin channels on FML|HS ServerHello
...
This may not be strictly necessary, in either case Forge server with
-Dfml.debugNetworkHandshake=true logs:
[14:26:03] [Netty Server IO #3/INFO] [FML]: Client protocol version 2
2016-01-23 14:26:11 -08:00
deathcap
e9159a432b
Send ClientHello response to ServerHello
2016-01-23 14:23:32 -08:00
deathcap
8af797a04c
FML|HS: encode ClientHello
2016-01-23 14:16:07 -08:00
deathcap
9bb788bb7a
FML|HS: ServerHello: overrideDimension only sent if fmlProtocolVersion>=2
2016-01-23 14:12:50 -08:00
deathcap
8f1704bc7a
FML|HS: ServerHello: decode overrideDimension
2016-01-23 14:08:20 -08:00
deathcap
09b4dc8358
Decode fmlProtocolVersion in ServerHello
2016-01-23 14:00:59 -08:00
deathcap
8018de5c29
Parse FML|HS discriminator byte using protodef
2016-01-23 13:49:48 -08:00
deathcap
1d8332e2e8
Log registered plugin channels
2016-01-23 13:40:59 -08:00
deathcap
bf04af23f9
client_forge example: enable forge
2016-01-23 13:04:50 -08:00
deathcap
a6604511c7
Create client_forge example copied from client_echo
2016-01-23 13:04:50 -08:00
deathcap
6e50863eaa
Append \0\FML\0 to hostname in set_protocol packet if Forge enabled
...
http://wiki.vg/User:Pokechu22/Forge#Connection_to_a_forge_server
2016-01-23 13:04:50 -08:00
Romain Beaumont
609c4466f7
Merge pull request #325 from deathcap/debug-read
...
Add debug logging for received packet data
2016-01-23 22:04:01 +01:00