This commit is contained in:
MW
2007-05-31 13:45:18 +00:00
parent c194bfbada
commit ee5bd67b82
6 changed files with 96 additions and 5 deletions

View File

@@ -78,10 +78,11 @@ namespace OpenSim
private int cachedtextureserial = 0;
private RegionInfo m_regionData;
protected AuthenticateSessionsBase m_authenticateSessionsHandler;
protected uint serverPort = 0;
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions, uint port)
{
this.serverPort = port;
m_world = world;
m_clientThreads = clientThreads;
m_assetCache = assetCache;

View File

@@ -16,10 +16,12 @@ namespace OpenSim
private IWorld _localWorld;
public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
public Dictionary<uint, IClientAPI> ClientAPIs = new Dictionary<uint, IClientAPI>();
protected uint serverPort;
public PacketServer(OpenSimNetworkHandler networkHandler)
public PacketServer(OpenSimNetworkHandler networkHandler, uint port)
{
_networkHandler = networkHandler;
this.serverPort = port;
_networkHandler.RegisterPacketServer(this);
}
@@ -66,7 +68,7 @@ namespace OpenSim
public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass)
{
ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass);
ClientView newuser = new ClientView(epSender, useCircuit, this.ClientThreads, this._localWorld, assetCache, this, inventoryCache, authenticateSessionsClass, serverPort);
this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);

View File

@@ -82,7 +82,7 @@ namespace OpenSim
protected virtual void CreatePacketServer()
{
PacketServer packetServer = new PacketServer(this);
PacketServer packetServer = new PacketServer(this, (uint) listenPort);
}
protected virtual void OnReceivedData(IAsyncResult result)