Sign in to follow this  
Fallen_Angel

Getting a client to register a server message in C#

Recommended Posts

I've been working on writing an MSN client as a way to get back into programming after taking a break for a while. I've been able to get the client to talk and authenticate to the server without any problems however I am now looking for the best way to go about putting my client in a ready state waiting for server messages (users coming online, receiving messages etc) and am not sure how to go about this in C#. The only networking code I have done was about 3 years ago using C. My client currently talks to the MSN server using the TcpClient class however I am not seeing any obvious way to stick it into a ready state once I'm done logging in. I'm thinking that it'd be possible to simply read the NetworkStream at timed intervals and check for any new messages although this doesn't seem overly practical. I've looked at the TcpListener class however the examples for this seem to be more geared towards setting up a server rather than a client listener. Can anyone point me in the right direction to get started with this. I'm using C# 2005 Express with the MSNP9 protocol if that matters.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this