1 module hunt.database.driver.mysql.impl.codec.InitialHandshakePacket; 2 3 // import hunt.collection.Arrays; 4 5 // @Deprecated 6 // //TODO we may drop this class later 7 // final class InitialHandshakePacket { 8 // /* 9 // https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_handshake_v10.html 10 // */ 11 12 // private final byte protocolVersion = 10; 13 // private final String serverVersion; 14 // private final long connectionId; 15 // private final int serverCapabilitiesFlags; 16 // private final short characterSet; 17 // private final int serverStatusFlags; 18 // private final byte[] scramble; 19 // private final String authMethodName; 20 21 22 // InitialHandshakePacket(String serverVersion, 23 // long connectionId, 24 // int serverCapabilitiesFlags, 25 // short characterSet, 26 // int serverStatusFlags, 27 // byte[] scramble, 28 // String authMethodName) { 29 // this.serverVersion = serverVersion; 30 // this.connectionId = connectionId; 31 // this.serverCapabilitiesFlags = serverCapabilitiesFlags; 32 // this.characterSet = characterSet; 33 // this.serverStatusFlags = serverStatusFlags; 34 // this.scramble = scramble; 35 // this.authMethodName = authMethodName; 36 // } 37 38 // byte getProtocolVersion() { 39 // return protocolVersion; 40 // } 41 42 // String getServerVersion() { 43 // return serverVersion; 44 // } 45 46 // long getConnectionId() { 47 // return connectionId; 48 // } 49 50 // int getServerCapabilitiesFlags() { 51 // return serverCapabilitiesFlags; 52 // } 53 54 // short getCharacterSet() { 55 // return characterSet; 56 // } 57 58 // int getServerStatusFlags() { 59 // return serverStatusFlags; 60 // } 61 62 // byte[] getScramble() { 63 // return scramble; 64 // } 65 66 // String getAuthMethodName() { 67 // return authMethodName; 68 // } 69 70 // override 71 // string toString() { 72 // return "InitialHandshakePacket{" ~ 73 // "protocolVersion=" ~ protocolVersion + 74 // ", serverVersion='" ~ serverVersion + '\'' + 75 // ", connectionId=" ~ connectionId + 76 // ", serverCapabilitiesFlags=" ~ serverCapabilitiesFlags + 77 // ", characterSet=" ~ characterSet + 78 // ", serverStatusFlags=" ~ serverStatusFlags + 79 // ", scramble=" ~ Arrays.toString(scramble) + 80 // ", authMethodName='" ~ authMethodName + '\'' + 81 // '}'; 82 // } 83 // }