|
From: <br...@us...> - 2008-07-09 09:43:35
|
Revision: 294
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=294&view=rev
Author: brus07
Date: 2008-07-09 02:43:28 -0700 (Wed, 09 Jul 2008)
Log Message:
-----------
Move protocol classes to special directory.
Modified Paths:
--------------
ACMServer/trunk/ACMServer/Library/Connector/Connector.csproj
ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs
ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs
Added Paths:
-----------
ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/
ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/EasyProtocol.cs
ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/IProtocol.cs
Removed Paths:
-------------
ACMServer/trunk/ACMServer/Library/Connector/EasyProtocol.cs
ACMServer/trunk/ACMServer/Library/Connector/IProtocol.cs
Modified: ACMServer/trunk/ACMServer/Library/Connector/Connector.csproj
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/Connector.csproj 2008-07-08 21:14:53 UTC (rev 293)
+++ ACMServer/trunk/ACMServer/Library/Connector/Connector.csproj 2008-07-09 09:43:28 UTC (rev 294)
@@ -38,13 +38,13 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="EasyProtocol.cs" />
<Compile Include="Getter\FileGetter.cs" />
<Compile Include="Getter\IGetter.cs" />
<Compile Include="Getter\WebGetter.cs" />
- <Compile Include="IProtocol.cs" />
<Compile Include="ISocket.cs" />
<Compile Include="SocketClient.cs" />
+ <Compile Include="SocketProtocol\EasyProtocol.cs" />
+ <Compile Include="SocketProtocol\IProtocol.cs" />
<Compile Include="SocketServer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WebConnector.cs" />
Deleted: ACMServer/trunk/ACMServer/Library/Connector/EasyProtocol.cs
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/EasyProtocol.cs 2008-07-08 21:14:53 UTC (rev 293)
+++ ACMServer/trunk/ACMServer/Library/Connector/EasyProtocol.cs 2008-07-09 09:43:28 UTC (rev 294)
@@ -1,36 +0,0 @@
-using System;
-using JadBenAutho.EasySocket;
-
-namespace AcmContester.Library.Connector
-{
- class EasyProtocol: IProtocol
- {
- int clientIndex = 0;
-
- #region IProtocol Members
-
- public void DataArrived(object message, ISocket socket)
- {
- socket.OnDataArrived(message);
- }
-
- public void Send(object message, EasyServer server)
- {
- if (server.CountClients > 0)
- {
- if (clientIndex >= server.CountClients)
- clientIndex = 0;
- server.SendData(message, clientIndex);
- clientIndex++;
- }
- }
-
- public void Send(object message, EasyClient client)
- {
- if (client.IsConnected == true)
- client.SendData(message);
- }
-
- #endregion
- }
-}
Deleted: ACMServer/trunk/ACMServer/Library/Connector/IProtocol.cs
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/IProtocol.cs 2008-07-08 21:14:53 UTC (rev 293)
+++ ACMServer/trunk/ACMServer/Library/Connector/IProtocol.cs 2008-07-09 09:43:28 UTC (rev 294)
@@ -1,11 +0,0 @@
-using JadBenAutho.EasySocket;
-
-namespace AcmContester.Library.Connector
-{
- interface IProtocol
- {
- void DataArrived(object message, ISocket socket);
- void Send(object message, EasyServer server);
- void Send(object message, EasyClient client);
- }
-}
Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs 2008-07-08 21:14:53 UTC (rev 293)
+++ ACMServer/trunk/ACMServer/Library/Connector/SocketClient.cs 2008-07-09 09:43:28 UTC (rev 294)
@@ -1,5 +1,6 @@
using System;
using JadBenAutho.EasySocket;
+using AcmContester.Library.Connector.SocketProtocol;
namespace AcmContester.Library.Connector
{
Property changes on: ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol
___________________________________________________________________
Name: tsvn:logminsize
+ 5
Copied: ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/EasyProtocol.cs (from rev 293, ACMServer/trunk/ACMServer/Library/Connector/EasyProtocol.cs)
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/EasyProtocol.cs (rev 0)
+++ ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/EasyProtocol.cs 2008-07-09 09:43:28 UTC (rev 294)
@@ -0,0 +1,36 @@
+using System;
+using JadBenAutho.EasySocket;
+
+namespace AcmContester.Library.Connector.SocketProtocol
+{
+ class EasyProtocol: IProtocol
+ {
+ int clientIndex = 0;
+
+ #region IProtocol Members
+
+ public void DataArrived(object message, ISocket socket)
+ {
+ socket.OnDataArrived(message);
+ }
+
+ public void Send(object message, EasyServer server)
+ {
+ if (server.CountClients > 0)
+ {
+ if (clientIndex >= server.CountClients)
+ clientIndex = 0;
+ server.SendData(message, clientIndex);
+ clientIndex++;
+ }
+ }
+
+ public void Send(object message, EasyClient client)
+ {
+ if (client.IsConnected == true)
+ client.SendData(message);
+ }
+
+ #endregion
+ }
+}
Property changes on: ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/EasyProtocol.cs
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/IProtocol.cs (from rev 293, ACMServer/trunk/ACMServer/Library/Connector/IProtocol.cs)
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/IProtocol.cs (rev 0)
+++ ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/IProtocol.cs 2008-07-09 09:43:28 UTC (rev 294)
@@ -0,0 +1,11 @@
+using JadBenAutho.EasySocket;
+
+namespace AcmContester.Library.Connector.SocketProtocol
+{
+ interface IProtocol
+ {
+ void DataArrived(object message, ISocket socket);
+ void Send(object message, EasyServer server);
+ void Send(object message, EasyClient client);
+ }
+}
Property changes on: ACMServer/trunk/ACMServer/Library/Connector/SocketProtocol/IProtocol.cs
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs
===================================================================
--- ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs 2008-07-08 21:14:53 UTC (rev 293)
+++ ACMServer/trunk/ACMServer/Library/Connector/SocketServer.cs 2008-07-09 09:43:28 UTC (rev 294)
@@ -1,5 +1,6 @@
using System;
using JadBenAutho.EasySocket;
+using AcmContester.Library.Connector.SocketProtocol;
namespace AcmContester.Library.Connector
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|