spellcast.game
Interface IPC

All Known Implementing Classes:
ServerConnectionHandler

public interface IPC

This interface allows the game to use inter process communication to the clients connected to the game. Through the use of this interface the implemenation specific details are hidden (whether they be tcp/ip or some other mechanism is irrelevant).

Author:
Barrie Treloar

Method Summary
 void connect(IPCHandle handle, Id client)
          Connect the handle with the specified Id.
 void disconnect(IPCHandle handle)
          Disconnect the client.
 IPCRequest receive()
          Receive an event from a client.
 void send(Id recipient, GameEvent e)
          Send an event to the specified client.
 void sendToAll(GameEvent e)
          Send the event to all clients.
 

Method Detail

send

void send(Id recipient,
          GameEvent e)
Send an event to the specified client. Does not block.


sendToAll

void sendToAll(GameEvent e)
Send the event to all clients. Equivalent to calling send multiple times for all clients.


receive

IPCRequest receive()
Receive an event from a client. This will block until an event is received.


connect

void connect(IPCHandle handle,
             Id client)
Connect the handle with the specified Id.


disconnect

void disconnect(IPCHandle handle)
Disconnect the client.



Copyright © 2001-2005 Spellcast. All Rights Reserved.