45fb96c4f2
library. 100% pure baby! At least for the moment. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1958 542714f4-19e9-0310-aa3c-eee0fc999fb1
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
//
|
|
// $Id: RunningConnection.java,v 1.9 2002/11/18 18:53:10 mdb Exp $
|
|
|
|
package com.threerings.presents.server.net;
|
|
|
|
import java.io.IOException;
|
|
import java.nio.channels.SelectionKey;
|
|
import java.nio.channels.SocketChannel;
|
|
|
|
import com.samskivert.util.StringUtil;
|
|
|
|
import com.threerings.presents.net.UpstreamMessage;
|
|
|
|
/**
|
|
* A running connection object represents a fully operational client
|
|
* connection to the server.
|
|
*/
|
|
public class RunningConnection extends Connection
|
|
{
|
|
/**
|
|
* Constructs a new running connection object to manage the supplied
|
|
* client socket.
|
|
*/
|
|
public RunningConnection (ConnectionManager cmgr, SelectionKey selkey,
|
|
SocketChannel channel, long createStamp)
|
|
throws IOException
|
|
{
|
|
super(cmgr, selkey, channel, createStamp);
|
|
}
|
|
|
|
/**
|
|
* Called when a new message has arrived from the client.
|
|
*/
|
|
public void handleMessage (UpstreamMessage msg)
|
|
{
|
|
}
|
|
|
|
public String toString ()
|
|
{
|
|
String addr = (_channel == null) ? "<disconnected>" :
|
|
StringUtil.toString(_channel.socket().getInetAddress());
|
|
return "[mode=RUNNING, id=" + (hashCode() % 1000) +
|
|
", addr=" + addr + "]";
|
|
}
|
|
}
|