Initial revision of cocktail multiplayer networked gaming platform. (Far

from complete.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-05-22 06:08:00 +00:00
parent 53d02843bb
commit 40ecd80e09
25 changed files with 1544 additions and 0 deletions
@@ -0,0 +1,56 @@
//
// $Id: UnsubscribeRequest.java,v 1.1 2001/05/22 06:08:00 mdb Exp $
package com.samskivert.cocktail.cher.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
public class UnsubscribeNotification extends UpstreamMessage
{
/** The code for an unsubscribe notification. */
public static final short TYPE = TYPE_BASE + 3;
/**
* Zero argument constructor used when unserializing an instance.
*/
public UnsubscribeNotification ()
{
super();
}
/**
* Constructs a unsubscribe notification for the distributed object
* with the specified object id.
*/
public UnsubscribeNotification (int oid)
{
_oid = oid;
}
public short getType ()
{
return TYPE;
}
public void writeTo (DataOutputStream out)
throws IOException
{
super.writeTo(out);
out.writeInt(_oid);
}
public void readFrom (DataInputStream in)
throws IOException
{
super.readFrom(in);
_oid = in.readInt();
}
/**
* The object id of the distributed object from which we are
* unsubscribing.
*/
protected int _oid;
}