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,55 @@
//
// $Id: ForwardEventRequest.java,v 1.1 2001/05/22 06:07:59 mdb Exp $
package com.samskivert.cocktail.cher.net;
import java.io.IOException;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import com.samskivert.cocktail.cher.dobj.Event;
import com.samskivert.cocktail.cher.dobj.EventFactory;
public class ForwardEventNotification extends UpstreamMessage
{
/** The code for a forward event notification. */
public static final short TYPE = TYPE_BASE + 4;
/**
* Zero argument constructor used when unserializing an instance.
*/
public ForwardEventNotification ()
{
super();
}
/**
* Constructs a forward event notification for the supplied event.
*/
public ForwardEventNotification (Event event)
{
_event = event;
}
public short getType ()
{
return TYPE;
}
public void writeTo (DataOutputStream out)
throws IOException
{
super.writeTo(out);
_event.writeTo(out);
}
public void readFrom (DataInputStream in)
throws IOException
{
super.readFrom(in);
_event = EventFactory.readFrom(in);
}
/** The event which we are forwarding. */
protected Event _event;
}