Sergey
Sergey

Reputation: 11908

C# chat wpf application

As I understand, it's possible to write a chat application (server + client) without any web server. As a server we can use just a class listening to TCP port. As a client we can also use a class.

So it's possible to write this application within one WPF application, is it so or not?

Upvotes: 2

Views: 4399

Answers (3)

Brian Driscoll
Brian Driscoll

Reputation: 19635

I think I'm understanding you correctly, but if not let me know.

It is possible to write a chat client in a single WPF application, however if you're building a chat application in the client-server model then you'll also need a chat server, which in all likelihood will not be a WPF app.

Upvotes: 0

NateTheGreat
NateTheGreat

Reputation: 2305

Yes, it's possible to do just as you've described... one class for the server and one for the client.

Upvotes: 0

Christian
Christian

Reputation: 4375

Basically yes. You can do this easily using Windows Communication Foundation (WCF) services. But at least one of your chat endpoints would have to specify the IP address of the other.

Note that this has got nothing to do with WPF. WPF is just the way of drawing the application / controls. This would work with Windows Forms applications as well.

Upvotes: 2

Related Questions