Skip to content

Instantly share code, notes, and snippets.

@JoeyEremondi
Created October 18, 2016 05:22
Show Gist options
  • Save JoeyEremondi/a9887168dac3699154d97bf471a83fe8 to your computer and use it in GitHub Desktop.
Save JoeyEremondi/a9887168dac3699154d97bf471a83fe8 to your computer and use it in GitHub Desktop.
//Definitely NOT valid go, just pseudocode
/** #SESSION TYPE
Buyer
Seller
Buyer.Send(Seller, "BUY")
End
*/
func main()
{
if amActor "BUYER"
doBuyer()
else ifamActor "SELLER"
doSeller()
}
func doBuyer()
{
Send(Seller, 0 /*TODO fill in auto-generated value*/)
}
func doSeller()
{
someBuf := []
Recieve(Buyer, someBuf /*TODO fill in auto-generated value*/)
//Auto-generated stub, do something with someBuf
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment