C# Class MpcLib.DistributedSystem.NetSimulator

Represents a network simulator.
Show file Open project: mahdiz/mpclib Class Usage Examples

Public Properties

Property Type Description
SentByteCount System.Numerics.BigInteger
SentMessageCount System.Numerics.BigInteger
idGen int

Public Methods

Method Description
Broadcast ( int fromId, ulong protocolId, Msg msg, int delay ) : void
FakeMulticast ( int idCount, int bytes ) : void
FakeSend ( int bytes ) : void
GetParty ( int id ) : Party
Init ( int seed ) : void
Loopback ( int id, ulong protocolId, Msg msg ) : void
Multicast ( int fromId, ulong protocolId, IEnumerable toIds, Msg msg, int delay ) : void
RegisterParty ( Party p ) : void
Reset ( ) : void
Run ( ) : void
Send ( int fromId, int toId, ulong protocolId, Msg msg, int delay ) : void
Send ( int fromId, ulong protocolId, ICollection msgs, ICollection recipients, int delay ) : void
Send ( int fromId, ulong protocolId, ICollection msgs, int delay ) : void

Sends the i-th message to the i-th party.

Method Details

Broadcast() public static method

public static Broadcast ( int fromId, ulong protocolId, Msg msg, int delay ) : void
fromId int
protocolId ulong
msg Msg
delay int
return void

FakeMulticast() public static method

public static FakeMulticast ( int idCount, int bytes ) : void
idCount int
bytes int
return void

FakeSend() public static method

public static FakeSend ( int bytes ) : void
bytes int
return void

GetParty() public static method

public static GetParty ( int id ) : Party
id int
return Party

Init() public static method

public static Init ( int seed ) : void
seed int
return void

Loopback() public static method

public static Loopback ( int id, ulong protocolId, Msg msg ) : void
id int
protocolId ulong
msg Msg
return void

Multicast() public static method

public static Multicast ( int fromId, ulong protocolId, IEnumerable toIds, Msg msg, int delay ) : void
fromId int
protocolId ulong
toIds IEnumerable
msg Msg
delay int
return void

RegisterParty() public static method

public static RegisterParty ( Party p ) : void
p Party
return void

Reset() public static method

public static Reset ( ) : void
return void

Run() public static method

public static Run ( ) : void
return void

Send() public static method

public static Send ( int fromId, int toId, ulong protocolId, Msg msg, int delay ) : void
fromId int
toId int
protocolId ulong
msg Msg
delay int
return void

Send() public static method

public static Send ( int fromId, ulong protocolId, ICollection msgs, ICollection recipients, int delay ) : void
fromId int
protocolId ulong
msgs ICollection
recipients ICollection
delay int
return void

Send() public static method

Sends the i-th message to the i-th party.
public static Send ( int fromId, ulong protocolId, ICollection msgs, int delay ) : void
fromId int
protocolId ulong
msgs ICollection
delay int
return void

Property Details

SentByteCount public static property

Total number of bytes sent by all parties in the network.
public static BigInteger,System.Numerics SentByteCount
return System.Numerics.BigInteger

SentMessageCount public static property

Total number of messages sent by all parties in the network.
public static BigInteger,System.Numerics SentMessageCount
return System.Numerics.BigInteger

idGen public static property

public static int idGen
return int