Show
Ignore:
Timestamp:
11/19/08 13:48:57 (17 years ago)
Author:
yumileroy
Message:

[svn] *** Source: MaNGOS ***
* Fixed english spelling in src/game/WorldSocket.h/cpp. Author: Derex
* [240_world.sql] Create new command .senditems and remove from moderator level command .sendmail possibility send items. Author: Vladimir
* Added new command: .sendmoney player "subject" "message" money - Sends a mail with money to a player. Author: fredi
* Correctly apply taken damage debufs/bonuses in cases non-physical melee damage. Author: Frankir
* Fix a crash in add friend/ignore callback. (check if player still logged in). Author: Hunuza
* Better args checking in .sendmoney command. Author: Vladimir

Original author: visagalis
Date: 2008-11-14 17:50:48-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/WorldSocket.h

    r181 r232  
    5656 * WorldSocket. 
    5757 * 
    58  * This class is responsible for the comunication with 
     58 * This class is responsible for the communication with 
    5959 * remote clients. 
    6060 * Most methods return -1 on failure. 
    61  * The class uses refferece counting. 
     61 * The class uses reference counting. 
    6262 * 
    6363 * For output the class uses one buffer (64K usually) and 
    6464 * a queue where it stores packet if there is no place on 
    6565 * the queue. The reason this is done, is because the server 
    66  * does realy a lot of small-size writes to it, and it doesn't 
     66 * does really a lot of small-size writes to it, and it doesn't 
    6767 * scale well to allocate memory for every. When something is 
    68  * writen to the output buffer the socket is not immideately 
     68 * written to the output buffer the socket is not immediately 
    6969 * activated for output (again for the same reason), there 
    7070 * is 10ms celling (thats why there is Update() method). 
    71  * This concept is simmilar to TCP_CORK, but TCP_CORK 
    72  * usses 200ms celling. As result overhead generated by 
     71 * This concept is similar to TCP_CORK, but TCP_CORK 
     72 * uses 200ms celling. As result overhead generated by 
    7373 * sending packets from "producer" threads is minimal, 
    74  * and doing a lot of writes with small size is tollerated. 
    75  * 
    76  * The calls to Upate () method are managed by WorldSocketMgr 
     74 * and doing a lot of writes with small size is tolerated. 
     75 * 
     76 * The calls to Update () method are managed by WorldSocketMgr 
    7777 * and ReactorRunnable. 
    7878 * 
    7979 * For input ,the class uses one 1024 bytes buffer on stack 
    80  * to which it does recv() calls. And then recieved data is 
    81  * distributed where its needed. 1024 matches pritey well the 
     80 * to which it does recv() calls. And then received data is 
     81 * distributed where its needed. 1024 matches pretty well the 
    8282 * traffic generated by client for now. 
    8383 * 
    8484 * The input/output do speculative reads/writes (AKA it tryes 
    85  * to read all data avaible in the kernel buffer or tryes to 
    86  * write everything avaible in userspace buffer), 
    87  * which is ok for using with Level and Edge Trigered IO 
     85 * to read all data available in the kernel buffer or tryes to 
     86 * write everything available in userspace buffer), 
     87 * which is ok for using with Level and Edge Triggered IO 
    8888 * notification. 
    8989 * 
     
    100100        typedef ACE_Acceptor< WorldSocket, ACE_SOCK_ACCEPTOR > Acceptor; 
    101101 
    102         /// Mutex type used for various syncronizations. 
     102        /// Mutex type used for various synchronizations. 
    103103        typedef ACE_Thread_Mutex LockType; 
    104104        typedef ACE_Guard<LockType> GuardType; 
     
    121121        int SendPacket (const WorldPacket& pct); 
    122122 
    123         /// Add refference to this object. 
     123        /// Add reference to this object. 
    124124        long AddReference (void); 
    125125 
    126         /// Remove refference to this object. 
     126        /// Remove reference to this object. 
    127127        long RemoveReference (void); 
    128128 
     
    186186        ACE_Time_Value m_LastPingTime; 
    187187 
    188         /// Keep track of overspeed pings ,to prevent ping flood. 
     188        /// Keep track of over-speed pings ,to prevent ping flood. 
    189189        uint32 m_OverSpeedPings; 
    190190 
     
    198198        LockType m_SessionLock; 
    199199 
    200         /// Session to which recieved packets are routed 
     200        /// Session to which received packets are routed 
    201201        WorldSession* m_Session; 
    202202 
    203         /// here are stored the fragmens of the recieved data 
     203        /// here are stored the fragments of the received data 
    204204        WorldPacket* m_RecvWPct; 
    205205 
    206206        /// This block actually refers to m_RecvWPct contents, 
    207         /// which alows easy and safe writing to it. 
     207        /// which allows easy and safe writing to it. 
    208208        /// It wont free memory when its deleted. m_RecvWPct takes care of freeing. 
    209209        ACE_Message_Block m_RecvPct; 
    210210 
    211         /// Fragment of the recieved header. 
     211        /// Fragment of the received header. 
    212212        ACE_Message_Block m_Header; 
    213213 
    214         /// Mutex for protecting otuput related data. 
     214        /// Mutex for protecting output related data. 
    215215        LockType m_OutBufferLock; 
    216216 
     
    222222 
    223223        /// Here are stored packets for which there was no space on m_OutBuffer, 
    224         /// this alows not-to kick player if its buffer is overflowed. 
     224        /// this allows not-to kick player if its buffer is overflowed. 
    225225        PacketQueueT m_PacketQueue; 
    226226