Files
2006Scape/2006Redone Server/src/com/rebotted/net/GameCodecFactory.java
T
Mr Extremez d876a923b9 Cleanup part 1 (#213)
* Clean up part 1

- Removed lots of dead code
- Removed unncessary files not in use
- Cleaned up small bits of code
- Removed a few warnings
- Server.java ---> GameEngine.java
- Constants.java ---> GameConstants.java

* Cape Dye

Rewrote cape dying

* Packaging

- redone ----> com.rebotted

* PacketSender/clean up

- ActionSender ---> PacketSender
- Moved many more packets to packetsender
- Cleaned up more dead code

* Merge Client/Player

- Merged Client.java with Player.java (both were doing same thing so redundant to have both)
- Removed some more dead code
- Tidy a few small things up

* Quests/more clean up

- Removed more dead code
- Made quests static in order to clean them up a bit

* More cleanup

- Removed some more of the dead quest code
- Correcting naming of some of the shop variables
2019-11-25 12:08:56 -05:00

47 lines
896 B
Java

package com.rebotted.net;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;
import com.rebotted.util.ISAACRandomGen;
/**
* Provides access to the encoders and decoders for the 508 protocol.
*
* @author Graham
*/
public class GameCodecFactory implements ProtocolCodecFactory {
/**
* The encoder.
*/
private final ProtocolEncoder encoder = new RS2ProtocolEncoder();
/**
* The decoder.
*/
private final ProtocolDecoder decoder;
public GameCodecFactory(ISAACRandomGen inC) {
decoder = new RS2ProtocolDecoder(inC);
}
@Override
/**
* Get the encoder.
*/
public ProtocolEncoder getEncoder() throws Exception {
return encoder;
}
@Override
/**
* Get the decoder.
*/
public ProtocolDecoder getDecoder() throws Exception {
return decoder;
}
}