singrdk/base/Contracts/NetStack.Contracts/UDPContract.sg

39 lines
983 B
Plaintext
Raw Permalink Normal View History

2008-03-05 09:52:00 -05:00
///////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: UDPContract.sg
//
// Note: Contract definition for UDP channels
//
using Microsoft.Singularity.Directory;
namespace NetStack.Contracts
{
public contract UdpContract : ServiceContract
{
// The name you should use to look up this module using the NameServer.
2008-11-17 18:29:00 -05:00
public const string ModuleName = "/service/udp";
2008-03-05 09:52:00 -05:00
// Signal our identity
out message Ready();
// Create a new UDP connection
in message CreateUdpSession(UdpConnectionContract.Exp:Start! endpoint);
out message Ack();
override state Start : one
{
Ready! -> ReadyState;
}
state ReadyState : one
{
CreateUdpSession? -> Ack! -> ReadyState;
}
}
}