Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeRequest ¶
func DecodeRequest(rd RequestDecrypter, data []byte, v interface{}) error
DecodeRequest decodes the bytes from a request body into the target, v.
func WriteResponse ¶
func WriteResponse(w io.Writer, rt ResponseType, data []byte) error
WriteResponse writes a gamestate response command and data to the given writer.
Types ¶
type InvalidDecodeTargetError ¶
InvalidDecodeTargetError is returned when a request is attempted to be decoded into an invalid type (type must be a non-nil pointer).
func (InvalidDecodeTargetError) Error ¶
func (i InvalidDecodeTargetError) Error() string
type RequestDecrypter ¶
RequestDecrypter is the interface that wraps the basic Decrypt method.
Decrypt returns a byte slice containing the decrypted contents of the given input byte slice.
type ResponseType ¶
type ResponseType int
ResponseType indicates to Demon's Souls the type of response being returned.
var ( ResponseLogin ResponseType = 0x02 ResponseAddQWCData ResponseType = 0x09 ResponseAddSummonSOSData ResponseType = 0x0a ResponseCheckSOSData ResponseType = 0x0b ResponseCharacterTendency ResponseType = 0x0e ResponseGetWanderingGhost ResponseType = 0x11 ResponseMultiplayerOp ResponseType = 0x15 ResponseGeneric ResponseType = 0x17 ResponseAddData ResponseType = 0x1d ResponseReplayData ResponseType = 0x1e ResponseGetSOSData ResponseType = 0x0f ResponseListData ResponseType = 0x1f ResponseUpdateMsgGrade ResponseType = 0x2a ResponseUpdateOtherPlayerGrade ResponseType = 0x2b ResponseFinaliseMultiplayer ResponseType = 0x21 ResponseTimeMsg ResponseType = 0x22 ResponseSummonMonk ResponseType = 0x23 ResponseDeleteBloodMsg ResponseType = 0x27 ResponseCharacterMPGrade ResponseType = 0x28 ResponseCharacterBloodMsgGrade ResponseType = 0x29 )
Click to show internal directories.
Click to hide internal directories.