Class ReqSender



    Purpose

    A ReqSender is to send requests to the server for a client.

    Functionality

    Each client has its ReqSender and all the out going requests are sent by the ReqSender to the server.

    A ReqSender first generates the request message and the sends it to the server through the correct outgoing socket.

    Structure

    There are two out going channels: one is for sending map related requests and the other is for sending action related requests. The ReqSender can get these two channels from ClientGlobal data.

    ReqSender has the following methods to send different requests:

    Action related:
    moveReq: Send a MsgMoveReq message to the server.
    takeReq: Send a MsgTakeReq message to the server.
    dropReq: Send a MsgDropReq message to the server.
    talkReq: Send a MsgTalkFromReq message to the server.
    quitReq: Send a MsgLeave message to the server.
    crashReport: Send a MsgClientReport message to the server.

    Map related:
    mapReq: Request for the specified block data.

    See also

    Message
    ClientGlobal




    [Go to Class Index Table] [Go back to Program Architecture Diagram]
    [Source Code of ReqSender.java]