|
(1) You can use socket programming. Open a port of Server and each client send data on that port with self identification.
(2) Handled the each client in thread.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
Yeh I know that , but my question was which technique I shd use ? and why ?
because I have seen some exampls of client-server written using Asynch methods and it looks very easy n good , but not sure how much stable and efficent it is ...
So please any one who knos the diff between these 3 techniques and reason... ?
HELLO
|
|
|
|
|
As per the developers opinion Asynchronous is best way to developed client-server
architecture. Because Asynchronous sockets use multiple threads from the system thread pool to process network connections. One thread is responsible for initiating the sending or receiving of data; other threads complete the connection to the network device and send or receive the data.
If you would like to get some example please find below link.........
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconUsingNon-blockingClientSocket.asp
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
If your application is not a real time control application, then you can ignore any time dependencies. However, if your application is a real time control application, then you will want to consider asynchronous as being your top candidate.
Please note that if you use Asynchronous socket programming, you will be using the thread pool anyway. That's how delegate calls work. It is also the case that the timers in .Net use thread pool threads.
Some problems that are apparent with thread pool threads are that control over the state of a thread pool thread is not easily available. Please be careful when using them. You also need to ensure that code called by the thread pool reports when an error occurs. Throwing an exception may only cause the thread to terminate and not cause the exception to be caught in a place where it can be handled properly.
Phil
|
|
|
|
|
iam workiimh in desktop application c#2005
it's stores applocation
i need to customized datagrid application to appear as sub_rows
for example
row ave the first type then +{plus sing} beside it when use this button all products under that type appears
so when i open the form all types appear and +sing beside it
like the datagrid style when choose datafrom two different table
ma_refay
|
|
|
|
|
I am using the following database connection in my device application
SqlceConnection con=new SqlceConnection ("Data Source=D:\\bd1\\db.sdf");
i kept db.sdf in same location.
but it is giving error message file not found. Help me out...
|
|
|
|
|
I have a VC++ dll and i want to call it in my C# Windows Application.
How can I do it?
|
|
|
|
|
|
Either DllImport or if it is COM registered then Interop.
|
|
|
|
|
hi,
i have a webpage with to textbox named username and password and a datagrid. i have also a add button. whenever i click the add button then the contenct of both textboxes must be fill in the datagrid but i dont want to save the record in the database until i click another button "Submit". I also have to delete the record from the datagrid. then what should i do.
Pankaj
|
|
|
|
|
Using datasets solve the pblm
|
|
|
|
|
|
Good Day Sir/Maam,
I have now finished by project and have created a *.hlp file using WinHelp.
I have a Menu Bar and it contains a HELP menu.
Is it possible that when the user clicked on the HELP menu, the *.hlp file will run?
Thank you in advance.
|
|
|
|
|
Hi.
Yes it's possible. If you have your help file in the same catalog as program, you can use this code:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "Help.hlp";
p.Start();
|
|
|
|
|
Very nice. Did the job.
Thank you sir.
|
|
|
|
|
|
I am using .NET 2005 c# with NHibernate 1.0.2, with the method CreateCriteria, it return value is IList, but in .NET 2005 only has IList<>. how to convert IList to IList<> or how to slove it problem
|
|
|
|
|
Hi.
You can use IList interface in .NET 2.0, it's situated in System.Collections namespace. But answer to your question you'll find on this page:
http://dimapasko.spaces.live.com/blog/cns!19D0AD1FA1CDA8!138.entry
and
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=966134&SiteID=1
|
|
|
|
|
|
Hi All,
Greetings. When I am tring to send mails from my domain using System.Web.Mail.
System.Web.HttpException: The transport failed to connect to the server. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at _Default.Button1_Click(Object sender, EventArgs e)
This is the error I am getting. Please help me on this issue. Thanks in advance...
JIJO BABY - Lets Play C#
|
|
|
|
|
|
|
|
My program uses multiple threads to do something, and i want to make a progress bar to show the process status, the problem is that i can't update the progressbar from the thread (gives an exception..not the thread it was created on).
what can i do?
|
|
|
|
|
Use the standard technique (InvokeRequired/Invoke) explained over and over in CP articles;
both of my articles contain a simple example.
|
|
|
|