Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/p/y/pygglib-HEAD/pygglib.py   pygglib(Download)
			header = GGHeader()
			try:
				header.read(self.__connection)
			except: #paskudnie, ale coz... ;) Na koniec sesji to jest potrzebne
				break
 
			header = GGHeader()
			header.read(self.__connection)
			if header.type != GGIncomingPackets.GGWelcome:
				raise GGUnexceptedPacket((header.type, header.length))
									self.__local_port, self.__external_ip, self.__external_port, self.__image_size)
			out_packet.send(self.__connection)
			header.read(self.__connection)
			if header.type == GGIncomingPackets.GGLoginOK:
				self.__logged = True

src/p/y/pygglib-HEAD/tests/module_tests.py   pygglib(Download)
	conn = Connection("217.17.45.153", 8074)
	header = GGHeader()
	header.read(conn)
	if header.type != GGIncomingPackets.GGWelcome:
		raise "Unexpected packet got!"
	out_packet = GGLogin(11327271, "eto2007", 0x0004, seed, "opis :)")
	out_packet.send(conn)
	header.read(conn)
	print "Got Packet:\n \ttype: %d\n\tlength: %d" % (header.type, header.length)
	if header.type == GGIncomingPackets.GGLoginOK:
 
	# w takim razie jeszcze poczekajmy na jakis pakiecik...
	header.read(conn)
	print "Got Packet:\n \ttype: %d\n\tlength: %d" % (header.type, header.length)
	if header.type == GGIncomingPackets.GGRecvMsg:
 
		#potwierdzenie dostarczenia wiadomosci
		header.read(conn)
		print "Got Packet:\n \ttype: %d\n\tlength: %d" % (header.type, header.length)
		if header.type == GGIncomingPackets.GGSendMsgAck: