Documentation ¶
Index ¶
Constants ¶
View Source
const RoleA = "A"
View Source
const RoleB = "B"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoleA_1To1_1 ¶
type RoleA_1To1_1 struct { session.LinearResource // contains filtered or unexported fields }
func (*RoleA_1To1_1) DotSend ¶
func (st1 *RoleA_1To1_1) DotSend(v int) *RoleA_1To1_End
Session has started, so if an error occurs, then a runtime error is produced and the program exits
type RoleA_1To1_End ¶
type RoleA_1To1_End struct { }
type RoleA_1To1_Init ¶
type RoleA_1To1_Init struct { session.LinearResource // contains filtered or unexported fields }
func NewRoleA ¶
func NewRoleA(id, nA, nB int) (*RoleA_1To1_Init, error)
func (*RoleA_1To1_Init) Accept ¶
func (ini *RoleA_1To1_Init) Accept(rolename string, id int, addr, port string) error
func (*RoleA_1To1_Init) Init ¶
func (ini *RoleA_1To1_Init) Init() (*RoleA_1To1_1, error)
Session hasn't started, so an error is returned if anything 'goes wrong' For the A, wait until a connection for each participant is available. FIXME: inefficient spinlock. TODO: Assumption, rolename and
func (*RoleA_1To1_Init) Run ¶
func (ini *RoleA_1To1_Init) Run(f func(*RoleA_1To1_1) *RoleA_1To1_End)
Convenience to check that user implements the full protocol
type RoleB_1Ton_1 ¶
type RoleB_1Ton_1 struct { session.LinearResource // contains filtered or unexported fields }
func (*RoleB_1Ton_1) DotRecv ¶
func (st1 *RoleB_1Ton_1) DotRecv() (int, *RoleB_1Ton_End)
type RoleB_1Ton_End ¶
type RoleB_1Ton_End struct { }
type RoleB_1Ton_Init ¶
type RoleB_1Ton_Init struct { session.LinearResource // contains filtered or unexported fields }
func NewRoleB ¶
func NewRoleB(id, nB, nA int) (*RoleB_1Ton_Init, error)
func (*RoleB_1Ton_Init) Connect ¶
func (ini *RoleB_1Ton_Init) Connect(rolename string, id int, addr, port string) error
func (*RoleB_1Ton_Init) Init ¶
func (ini *RoleB_1Ton_Init) Init() (*RoleB_1Ton_1, error)
Session hasn't started, so an error is returned if anything 'goes wrong'
func (*RoleB_1Ton_Init) Run ¶
func (ini *RoleB_1Ton_Init) Run(f func(*RoleB_1Ton_1) *RoleB_1Ton_End)
Click to show internal directories.
Click to hide internal directories.