473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how server display client's value

13
hello all, i have some calculation codes class in my client side, how my server gonna get those values and display it in my server? i had created windows forms labels in server.

know i have the calculation class and main client forms in my client side, and main server forms in my server side.

what should i do so that my server able to display those values (upload, speed, download, etc)?? what codes should i write? what kind of method can be used such as hashtable? dictionary? get set methods? or any other way??
i really had no idea. please help, thanks

here is the calculation snip codes in client:
Expand|Select|Wrap|Line Numbers
  1.  
  2. class Bandwidth_Speed
  3. {
  4.     private int bytesSentSpeed = 0;
  5.     private int bytesReceivedSpeed = 0;
  6.     private string Speed, InterfaceType, BytesReceived = "0", BytesSent = "0", Upload, Download, NetInterface;
  7.     private NetworkInterface[] netface;
  8.  
  9.     public void InitializeNetworkInterface()
  10.     {
  11.         netface = NetworkInterface.GetAllNetworkInterfaces();
  12.  
  13.         for (int i = 0; i < netface.Length; i++)
  14.         {
  15.             BytesReceived = "0";
  16.             BytesSent = "0";
  17.  
  18.             for (int x = 0; x < 2; x++)
  19.             {
  20.                 NetworkInterface nic = netface[i];
  21.  
  22.                 IPv4InterfaceStatistics interfaceStats = nic.GetIPv4Statistics();
  23.                 bytesSentSpeed = (int)(interfaceStats.BytesSent - int.Parse(BytesSent)) / 1024;
  24.                 bytesReceivedSpeed = (int)(interfaceStats.BytesReceived - int.Parse(BytesReceived)) / 1024;
  25.  
  26.                 Speed = (nic.Speed / (1024 * 1024)) + " MB";
  27.                 InterfaceType = nic.NetworkInterfaceType.ToString();
  28.                 BytesReceived = interfaceStats.BytesReceived.ToString();
  29.                 BytesSent = interfaceStats.BytesSent.ToString();
  30.                 Upload = bytesSentSpeed.ToString() + " kB/s";
  31.                 Download = bytesReceivedSpeed.ToString() + " kB/s";
  32.                 NetInterface = netface[i].Name;
  33.  
  34.                 Thread.Sleep(500);
  35.             }
  36.         }
  37.     }
  38. }
  39.  
Dec 11 '11 #1
0 1418

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
1
by: Shapper | last post by:
Hello, I have a working DataReader on a web page. I used it on a DataGrid. Something like: id name city 1 John London 2 Mary New York How can I display the...
1
by: Evan Kontos | last post by:
I have the need to test for the value of a client variable from a server control in a VB Web form. How can I do this in VB. Net? Evan Kontos | EKontos@comtekcadd.com 27 Whitehall St. | ...
0
by: Xavier | last post by:
hello, how can i display the returned value of a SqlDataSource in a Label <asp:SqlDataSource ConnectionString="<%$ ConnectionStrings:Pubs %>" ID="SqlDataSource1" runat="server"...
1
by: tsjuan | last post by:
Hello python users, I am just learning on how to use xmlrpc and stumbled upon how to pass com object from server to client side. The client side complain about can't marshall the com object....
3
by: technocraze | last post by:
Hi community experts, May I knw whether is it possible to display the corresponding value of the second textbox based on the user input in the first textbox? This means that once the user enters...
0
by: Zyronne | last post by:
Greetings! I need some help in my project. I have downloaded a sample remoting application from codeproject. I am not sure if it is possible to send back a message from server to client after...
1
nirmalsingh
by: nirmalsingh | last post by:
hai all, how to take client control value in javascript and assign it to server side control? and i need that server side control value in code behind(c#) to save it. how to do this? Thanx in...
2
by: arijitdas | last post by:
Hi, We have an ASP.NET 2.0 web application where we want to share few user specific data between server and client side code using cookie. We are seeing a very strange behavior that it does not...
2
by: sumanta123 | last post by:
Dear Sir, In my develpment i am getting stuck for a senario.Kindly please help me for it. Everytime we give the request we get the response of 8 records and its corresponding value. Then next...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.