Client Server Application

A

AliR \(VC++ MVP\)

Hi Everyone,

I'm an extreme novice when it comes to C#.

I am trying to start a client server application that is going to
communicate with a server over the internet, but I'm not sure what to use
for my communication layer.

There are some things that I'm using a Web Service for. For example logging
in, since it's synchronous operation. But what should I use for
asynchronous operations, should I use Sockets, Web Services, or .Net
Remoting?

The client application should connect to the server, login, then wait for
messages from the server, once it receives a message from the server it has
to send an appropriate response to the server.

If was writing a visual C++ application I would have inherited from a
CAsyncSocket class, implemented a messaging protocol on top the CAsyncSocket
class. When the CAsyncSocket class calls the callback method OnReceive I
would get the data, assemble the received message and pass it to the message
handler class for processing.

Thanks
AliR.
 
A

Arne Vajhøj

AliR said:
I am trying to start a client server application that is going to
communicate with a server over the internet, but I'm not sure what to
use for my communication layer.

There are some things that I'm using a Web Service for. For example
logging in, since it's synchronous operation. But what should I use for
asynchronous operations, should I use Sockets, Web Services, or .Net
Remoting?

The client application should connect to the server, login, then wait
for messages from the server, once it receives a message from the server
it has to send an appropriate response to the server.

If was writing a visual C++ application I would have inherited from a
CAsyncSocket class, implemented a messaging protocol on top the
CAsyncSocket class. When the CAsyncSocket class calls the callback
method OnReceive I would get the data, assemble the received message and
pass it to the message handler class for processing.

I think you will need sockets in C# as well.

The System.Net.Socket.Socket class has asynchroneous
capabilities.

Arne
 
A

AliR \(VC++ MVP\)

Arne Vajhøj said:
I think you will need sockets in C# as well.

The System.Net.Socket.Socket class has asynchroneous
capabilities.

Arne

I was hopeing there was something new that would make my life a little
easier. :)

AliR.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top