OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
Loading...
Searching...
No Matches
smoke_test.FakeMaster Class Reference

Public Member Functions

 __init__ (self)
 receive (self, condition, seconds)
 send (self, port, command)
 close (self)

Public Attributes

 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 port = self.sock.getsockname()[1]
list packets = []

Detailed Description

A UDP socket on 127.0.0.1 standing in for a master server: it keeps
what the server sends and can query the server from the master's port.

Constructor & Destructor Documentation

◆ __init__()

smoke_test.FakeMaster.__init__ ( self)

Member Function Documentation

◆ close()

smoke_test.FakeMaster.close ( self)

◆ receive()

smoke_test.FakeMaster.receive ( self,
condition,
seconds )
Waits until a packet from the server satisfies condition(text) and returns it.

◆ send()

smoke_test.FakeMaster.send ( self,
port,
command )

Member Data Documentation

◆ packets

list smoke_test.FakeMaster.packets = []

◆ port

smoke_test.FakeMaster.port = self.sock.getsockname()[1]

◆ sock

smoke_test.FakeMaster.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

The documentation for this class was generated from the following file: