H
How to get a common name(CN) of SSL
Hello..
EveryOne..
i want to use the NET Remote between Server and Client.
But it was not good about the CPU Usage and sending time, whie i tested the
NET Remote.
so i write my code below..
[Server Side]
1. I made a Remote Server using TCPChannel.
try
{
m_channel = new TcpChannel(nPortNumber);
ChannelServices.RegisterChannel(m_channel, false);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(CReceiverParameterFromThird), strCentralName,
WellKnownObjectMode.Singleton);
}
catch (Exception ex)
{
Console.WriteLine("CreateCentral :" + ex.Message);
return false;
}
2. And i made a some of funtions like below.
But All Of Functions are nothing to do, they just write some text through
Console.
public class CReceiverParameterFromThird : MarshalByRefObject
{
public bool CreateParameter(string strId, string strName, int
nLength)
{
Console.WriteLine("CreateParameter : {0}
{1}:{2}ms",nLength.ToString(), DateTime.Now, DateTime.Now.Millisecond);
return true;
}
[Client Side]
1.The Remote Object was created like below.
m_receiverParameter =
(CReceiverParameterFromThird)Activator.GetObject(typeof(CReceiverParameterFromThird), "tcp://" + strCentralIP +":" + strPortNumber + "/" + "Central");
2.The Client will call a Remote Functions.
m_receiverParameter.CreateParameter(strId, strName, nLength);
[How to Test]
1.I called a Remote Functions like below.
static void Main(string[] args)
{
CCentralClient CentralClient = new CCentralClient();
CentralClient.CreateReceiver("10.1.2.220", "7000");
for (int i = 0; i < 20000; i++)
{
CentralClient.CreateParameter("1", "PM", i);
--- any of Remote Functions.----
Thread.Sleep(TimeSpan.FromMilliseconds(100));
}
}
}
After i call a Remote Function, The CPU Usage is increased both Server and
Client
about 2%~5%.
How can i solve this kind of problem, because i want to send a lot of data
and as soon as faster from Client To Server.
anyone help me how to solve this kind of problem.
EveryOne..
i want to use the NET Remote between Server and Client.
But it was not good about the CPU Usage and sending time, whie i tested the
NET Remote.
so i write my code below..
[Server Side]
1. I made a Remote Server using TCPChannel.
try
{
m_channel = new TcpChannel(nPortNumber);
ChannelServices.RegisterChannel(m_channel, false);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(CReceiverParameterFromThird), strCentralName,
WellKnownObjectMode.Singleton);
}
catch (Exception ex)
{
Console.WriteLine("CreateCentral :" + ex.Message);
return false;
}
2. And i made a some of funtions like below.
But All Of Functions are nothing to do, they just write some text through
Console.
public class CReceiverParameterFromThird : MarshalByRefObject
{
public bool CreateParameter(string strId, string strName, int
nLength)
{
Console.WriteLine("CreateParameter : {0}
{1}:{2}ms",nLength.ToString(), DateTime.Now, DateTime.Now.Millisecond);
return true;
}
[Client Side]
1.The Remote Object was created like below.
m_receiverParameter =
(CReceiverParameterFromThird)Activator.GetObject(typeof(CReceiverParameterFromThird), "tcp://" + strCentralIP +":" + strPortNumber + "/" + "Central");
2.The Client will call a Remote Functions.
m_receiverParameter.CreateParameter(strId, strName, nLength);
[How to Test]
1.I called a Remote Functions like below.
static void Main(string[] args)
{
CCentralClient CentralClient = new CCentralClient();
CentralClient.CreateReceiver("10.1.2.220", "7000");
for (int i = 0; i < 20000; i++)
{
CentralClient.CreateParameter("1", "PM", i);
--- any of Remote Functions.----
Thread.Sleep(TimeSpan.FromMilliseconds(100));
}
}
}
After i call a Remote Function, The CPU Usage is increased both Server and
Client
about 2%~5%.
How can i solve this kind of problem, because i want to send a lot of data
and as soon as faster from Client To Server.
anyone help me how to solve this kind of problem.