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

All Samples(17)  |  Call(14)  |  Derive(0)  |  Import(3)
Kazdy pakiet wysylany/pobierany do/od serwera zawiera na poczatku
naglowek - tym naglowkiem jest wlasnie struktura GGHeader.

src/p/y/pygglib-HEAD/OutgoingPackets.py   pygglib(Download)
import sys
import struct
from HeaderPacket import GGHeader
from Networking import Connection
from GGConstans import *
			self.image_size, 0xbe, self.description, self.time)
 
		connection.send(repr(GGHeader(GGOutgoingPackets.GGLogin60, len(data))) + data)
 
class GGNewStatus(GGOutgoingPacket):
			else:
				data = struct.pack("<I%dsBI" % (len(self.description), ), self.status, self.description, 0x00, self.time)
		connection.send(repr(GGHeader(GGOutgoingPackets.GGNewStatus, len(data))) + data)
 
class GGSendMsg(GGOutgoingPacket):
	def send(self, connection):
		assert type(connection) == Connection
 
		data = struct.pack("<III%ds" % (len(self.msg) + 1), self.rcpt, self.seq, self.msg_class, self.msg)
		connection.send(repr(GGHeader(GGOutgoingPackets.GGSendMsg, len(data))) + data)
	def send(self, connection):
		assert type(connection) == Connection
		connection.send(repr(GGHeader(GGOutgoingPackets.GGPing, 0)))
 
class GGListEmpty(GGOutgoingPacket):

src/p/y/pygglib-HEAD/pygglib.py   pygglib(Download)
from IncomingPackets import *
from OutgoingPackets import *
from HeaderPacket import GGHeader
from Helpers import *
from GGConstans import *
		"""
		while self.__logged:
			header = GGHeader()
			try:
				header.read(self.__connection)
					#else niech pobierze inny serwer i probuje dalej :-)
 
			header = GGHeader()
			header.read(self.__connection)
			if header.type != GGIncomingPackets.GGWelcome:

src/p/y/pygglib-HEAD/tests/module_tests.py   pygglib(Download)
	sys.path.append("../") # - dla linuksa
from OutgoingPackets import *
from HeaderPacket import GGHeader
from IncomingPackets import *
from Networking import Connection
if __name__ == "__main__":
	conn = Connection("217.17.45.153", 8074)
	header = GGHeader()
	header.read(conn)
	if header.type != GGIncomingPackets.GGWelcome: