Nothing happens upon connection coming up before game starts. Protocol types: INT(x) is two bytes, big-endian, representing x, a number 0 through 65535. STRING(s) is a representation of a string, s, represented as length and content. The length is a single octet, if it is 0 through 127; if it is longer, it is two octets, holding INT(l+32640) (so that a length of 128 maps to 0x80 0x00). The format cannot represent strings longer than 32895 octets. LOC is a place a card can be. This is represented as two octets. The first one classifies the place, the second gives detail: First Second Meaning 0x00 0x00 Stock pile 0x01 0x00 Turned-up trump 0x02 N Nth card in player's own hand 0x03 N Nth card in opponent's hand 0x04 0x00 Play-to-trick location 0x05 0x00 Player's own trick pile 0x06 0x00 Opponent's trick pile 0x07 TBD Player's own meld area 0x08 TBD Opponent's meld area CARD is one byte, which represents a card ID. This is a simple integer from 0 to 95, one for each card of the deck. IMAGE is one byte, which represnts a card image. This is a simple integer from 0 to 24. 0 through 23 represent the card images + 0 1 2 3 4 5 0 9C JC QC KC 10C AC 6 9D JD QD KD 10D AD 12 9H JH QH KH 10H AH 18 9S JS QS KS 10S AS while 24 represents the deck's back image. DEAL is 0 or 1, indicating who is dealer this game: 0 means the recipient is not dealer, 1 that the recipient is dealer. STAGE is one octet, indicating game phase: 0x00 Dealing 0x01 Phase 1: recipient to lead. 0x02 Phase 1: opponent to lead. 0x03 Phase 1: recipient to play second. 0x04 Phase 1: opponent to play second. 0x05 Phase 1: recipient to meld or draw. 0x06 Phase 1: opponent to meld or draw. 0x07 Phase 2: recipient to lead. 0x08 Phase 2: opponent to lead. 0x09 Phase 2: recipient to play second. 0x0a Phase 2: opponent to play second. 0x0b End-of-hand count-up. WHO is one octet, indicating a player: 0 is the receiving player, 1 is the other player. Messages sent by game admin: Upon game start, to reset and indicate dealer: - 0x01 DEAL Reset means all cards displaying the deck back pattern, in the stock pile. To move a card instantly (teleport it): - 0x02 CARD LOC To move a card with animation: - 0x03 CARD LOC To set a card's displayed image: - 0x04 CARD IMAGE To delay for n milliseconds before continuing: - 0x05 INT(n) To raise a card to the top of the stacking order: - 0x06 CARD To lower a card to the bottom of the stacking order: - 0x07 CARD To delay until all live animations finish: - 0x08 To indicate game stage: - 0x09 STAGE To update scoring, indicating that someone's score has increased by d, for a new total score of s, with WHAT being the text description for score history: - 0x0a WHO INT(s) INT(d) STRING(WHAT) Messages sent by client: To play a card to a trick (lead or not): - 0x81 CARD