#NEWLINE# def handshake( self ) : #NEWLINE# #INDENT# packet = Connection ( ) #NEWLINE# packet . write_varint ( 0 ) #NEWLINE# packet . write_varint ( self . version ) #NEWLINE# packet . write_utf ( self . host ) #NEWLINE# packet . write_short ( self . port ) #NEWLINE# packet . write_varint ( 1 ) #NEWLINE# self . connection . write_buffer ( self )