Network cleanup (#552)
* Replaced packetType/Size with packet * Replace Instream with Packet Read data directly from packet to ease future network upgrade * Update Packet.java Removed unused methods to ease netty migration and network rewrite. * Moved packet sizes. * Removed unused stream methods * Added readhex method for buttons * preparing to replace mina * Packet->GamePacket for refactoring * Netty 3.6.6 * formatting * formatting * Apollo core * Update net.xml Added variables for 2006scape * Netty 4 migration. Jagcached replaced with Apollo Core * Porting network into apollo * WIP Packet Changes Do not merge. This is broken. * Packet read methods converted to netty buffer * Replacing game network and login with apollo * Netty 4 * Cleanup * Same port for update and game server. * Cleanup login for integration with apollo * Login works. fixing packets * Running on apollo netcode. * Server runs * Update apollo-core.jar * Disable encoder. write outstream directly to channel. * Update RS2ProtocolDecoder.java Added apollo decoder * Add constant * Synchronization not needed * Update apollo-core.jar * Better performance. * Commit pre PR * Update apollo-core.jar * Fixup Port Binding Based On World * Apollo files * Additional Commit --------- Co-authored-by: Dark98 <darkaidz98@gmail.com>
This commit is contained in:
1 parent
aa6dbba8e2
commit
e46b7142c3
193 files changed
+9830
-4090
No files matched your search
@@ -1,30 +1,32 @@
|
||||
package com.rs2.game.players;
|
||||
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.apollo.game.session.GameSession;
|
||||
|
||||
import com.rs2.GameConstants;
|
||||
import com.rs2.util.Stream;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
|
||||
public class Client extends Player {
|
||||
|
||||
public Client(IoSession s, int _playerId) {
|
||||
public Client(GameSession s, int _playerId) {
|
||||
super(_playerId);
|
||||
session = s;
|
||||
outStream = new Stream(new byte[GameConstants.BUFFER_SIZE]);
|
||||
outStream.currentOffset = 0;
|
||||
inStream = new Stream(new byte[GameConstants.BUFFER_SIZE]);
|
||||
inStream.currentOffset = 0;
|
||||
buffer = new byte[GameConstants.BUFFER_SIZE];
|
||||
}
|
||||
|
||||
//bots
|
||||
public Client(IoSession s) {
|
||||
public Client(GameSession s) {
|
||||
super(-1);
|
||||
isBot = true;
|
||||
session = null;
|
||||
inStream = new Stream(new byte[GameConstants.BUFFER_SIZE]);
|
||||
inStream.currentOffset = 0;
|
||||
buffer = new byte[GameConstants.BUFFER_SIZE];
|
||||
}
|
||||
|
||||
public void setSession(GameSession session) {
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user