Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Ok... as I've mentioned before in some other threads, a friend of mine and I are trying to create a messaging program completely from scratch. Now, with the suggestions of others, we've decided on using the client/server method as opposed to peer-to-peer. Now, for my question.

 

We don't just want "anyone" connecting to this port on our server, so we want to develop some type of "handshake". How would one go about setting up a connection so that in order to connect to the server, the client must provide a "connect string" to authenticate the client or the connection is dropped by the server. Such as:

 

If someone doesn't provide the required information within a certain time period when connected to that port, the server drops the connection.

 

Thanks.

If it works... don't worry, I'll fix it.
  • *Gurus*
Posted
The way Messenger does it is to establish a random "password" for each chatroom created, even those with just two people. When the notification is sent to a client that a chatroom has been established and a message is about to be sent, the password is sent along with it. The client can then connect to the chat server and give their password.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted
I was thinking more along the lines of a hacker connecting to that port on the server. Or is that what you mean?
If it works... don't worry, I'll fix it.
Posted
So you mean if a user doesn't have that password, the server will disconnect them. Because what I don't want, is someone just connecting to the server using TCP and gaining access to the server itself. That's what I'm trying to prevent. Because people are going to be connected to the server when they're not chatting with anyone, but they should only be connected through our program. I want to prevent anyone from connecting that is not using our program.
If it works... don't worry, I'll fix it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...